(()=>{"use strict";var e,t={511:()=>{const e=window.wp.blocks,t=window.React,n=window.wp.i18n,r=window.wp.blockEditor,a=window.wp.components,l=JSON.parse('{"UU":"ucla-wordpress-plugin/ribbon"}');(0,e.registerBlockType)(l.UU,{edit:({attributes:e,setAttributes:l})=>{let{ribbonVariant:i,ribbonContent:o,ribbonWidth:s}=e;const c=(0,r.useBlockProps)();return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.InspectorControls,null,(0,t.createElement)(a.PanelBody,{title:(0,n.__)("Settings","ucla-wordpress-plugin"),initialOpen:!0},(0,t.createElement)(a.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,n.__)("Select variant","ucla-wordpress-plugin"),value:i,onChange:e=>{l({ribbonVariant:e})},help:(0,n.__)("Change the variant of the ribbon.","ucla-wordpress-plugin"),options:[{value:"brand",label:(0,n.__)("Brand","ucla-wordpess-plugin")},{value:"highlight",label:(0,n.__)("Highlight","ucla-wordpess-plugin")}]}),(0,t.createElement)(a.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,n.__)("Ribbon Width","ucla-wordpress-plugin"),onChange:e=>{l({ribbonWidth:e})},value:s,help:(0,n.__)("Change the width of the ribbon","ucla-wordpress-plugin")}))),(0,t.createElement)("div",{...c},(0,t.createElement)("div",{style:{maxWidth:s},className:`ucla-ribbon ucla-ribbon--${i}`},(0,t.createElement)(r.RichText,{className:"ucla-ribbon__text",tagName:"brand"===i?"h2":"h3",onChange:e=>{l({ribbonContent:e})},value:o,placeholder:"Lorem ipsum dolor sit amet consectetuer adipiscing",preserveWhiteSpace:!1}))))},save:({attributes:e})=>{const{ribbonVariant:n,ribbonContent:a,ribbonWidth:l}=e,i=r.useBlockProps.save();return(0,t.createElement)("div",{...i},(0,t.createElement)("div",{style:{maxWidth:l||null},className:`ucla-ribbon ucla-ribbon--${n}`},(0,t.createElement)(r.RichText.Content,{className:"ucla-ribbon__text",tagName:"brand"===n?"h2":"h3",value:a})))}})}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,n,a,l)=>{if(!n){var i=1/0;for(b=0;b<e.length;b++){for(var[n,a,l]=e[b],o=!0,s=0;s<n.length;s++)(!1&l||i>=l)&&Object.keys(r.O).every((e=>r.O[e](n[s])))?n.splice(s--,1):(o=!1,l<i&&(i=l));if(o){e.splice(b--,1);var c=a();void 0!==c&&(t=c)}}return t}l=l||0;for(var b=e.length;b>0&&e[b-1][2]>l;b--)e[b]=e[b-1];e[b]=[n,a,l]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={597:0,857:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var a,l,[i,o,s]=n,c=0;if(i.some((t=>0!==e[t]))){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(s)var b=s(r)}for(t&&t(n);c<i.length;c++)l=i[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(b)},n=globalThis.webpackChunkucla_wordpress_plugin=globalThis.webpackChunkucla_wordpress_plugin||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a=r.O(void 0,[857],(()=>r(511)));a=r.O(a)})();