"use strict";(self.webpackChunkfooconvert=self.webpackChunkfooconvert||[]).push([[624],{7260:function(e,t,o){var n=o(4997),l=o(4715),s=o(4018),i=JSON.parse('{"UU":"fc/split-layout"}'),a=o(6087),r=o(8908),c=o(3380),d=o(6942),f=o.n(d),u=o(790);const v=[["fc/split-layout-panel",{lock:{move:!0,remove:!0}},[]],["fc/split-layout-panel",{lock:{move:!0,remove:!0}},[]]];var g=e=>{const{settings:t,settingsDefaults:o,styles:n}=e,s=t?.fixedSide??o?.fixedSide,i=t?.fixedWidth??o?.fixedWidth,a=t?.verticalAlignment??o?.verticalAlignment,c=(0,r.useStyles)(n),d=(0,l.useBlockProps)({className:f()(C,`${C}--fixed-${s}`,`${C}--align-${a}`),style:{...c,"--fc-split-layout-fixed-width":i}}),{children:g,...x}=(0,l.useInnerBlocksProps)(d,{allowedBlocks:["fc/split-layout-panel"],template:v,templateLock:"insert",orientation:"horizontal"});return(0,u.jsx)("div",{...x,children:g})},x=o(6427),p=o(7723),h=o(2709),_=o(8534),m=o(6537),b=o(5678);const y=[{value:"280px",abbr:(0,p.__)("S","fooconvert"),label:(0,p.__)("Small","fooconvert")},{value:"360px",abbr:(0,p.__)("M","fooconvert"),label:(0,p.__)("Medium","fooconvert")},{value:"480px",abbr:(0,p.__)("L","fooconvert"),label:(0,p.__)("Large","fooconvert")}],S=[{value:"px",label:"px",default:360,step:4,min:160,max:1024},{value:"%",label:"%",default:40,step:1,min:10,max:90}],j=[{value:"top",label:(0,p.__)("Top","fooconvert"),icon:h.A},{value:"center",label:(0,p.__)("Center","fooconvert"),icon:_.A},{value:"bottom",label:(0,p.__)("Bottom","fooconvert"),icon:m.A},{value:"stretch",label:(0,p.__)("Stretch","fooconvert"),icon:b.A}];var A=e=>{const{clientId:t,settings:o,setSettings:n,settingsDefaults:s,styles:i,setStyles:a,stylesDefaults:c}=e,d=o?.fixedSide??s?.fixedSide,f=o?.fixedWidth??s?.fixedWidth,v=o?.verticalAlignment??s?.verticalAlignment;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(l.InspectorControls,{group:"settings",children:(0,u.jsxs)(x.PanelBody,{title:(0,p.__)("Layout","fooconvert"),children:[(0,u.jsx)(x.PanelRow,{children:(0,u.jsx)(r.ToggleSelectControl,{label:(0,p.__)("Fixed side","fooconvert"),value:d,onChange:e=>n({fixedSide:e!==s?.fixedSide?e:void 0}),options:[{value:"left",label:(0,p.__)("Left","fooconvert")},{value:"right",label:(0,p.__)("Right","fooconvert")}]})}),(0,u.jsx)(x.PanelRow,{children:(0,u.jsx)(r.SizeControl,{label:(0,p.__)("Fixed width","fooconvert"),value:f,onChange:e=>n({fixedWidth:e!==s?.fixedWidth?e:void 0}),sizes:y,units:S})}),(0,u.jsx)(x.PanelRow,{children:(0,u.jsx)(r.ToggleSelectControl,{label:(0,p.__)("Vertical alignment","fooconvert"),value:v,onChange:e=>n({verticalAlignment:e!==s?.verticalAlignment?e:void 0}),options:j,iconOnly:!0})})]})}),(0,u.jsx)(l.InspectorControls,{group:"styles",children:(0,u.jsx)(r.DimensionToolsPanel,{panelId:t,value:i?.dimensions,onChange:e=>a({dimensions:e}),controls:["padding","margin","gap"],defaults:c?.dimensions})})]})};const C="fc--split-layout",k={settings:{fixedSide:"right",fixedWidth:"360px",verticalAlignment:"center"},styles:{dimensions:{gap:"16px"}}};(0,n.registerBlockType)(i.UU,{icon:s.A,edit:e=>{const{setAttributes:t,attributes:{uniqueId:o,settings:n,styles:l}}=e;(0,a.useEffect)((()=>{(0,c.A)(o)||t({uniqueId:(0,r.generateGUID)()})}),[o]);const s={...k},i={...s?.settings??{}},d={...s?.styles??{}},f={...e,attributesDefaults:s,settings:n,setSettings:e=>t({settings:(0,r.$object)(n,e)}),settingsDefaults:i,styles:l,setStyles:e=>t({styles:(0,r.$object)(l,e)}),stylesDefaults:d};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(g,{...f}),(0,u.jsx)(A,{...f})]})},save:()=>(0,u.jsx)(l.InnerBlocks.Content,{})})},8908:function(e){e.exports=window.FooConvert.editor}},function(e){e(e.s=7260)}]);