"use strict";(self.webpackChunkfooconvert=self.webpackChunkfooconvert||[]).push([[576],{6229:function(e,t,n){var o=n(4997),s=n(4715),l=n(7947),a=JSON.parse('{"UU":"fc/split-layout-panel"}'),i=n(8908),r=n(6942),c=n.n(r),u=n(790),f=e=>{const{settings:t,settingsDefaults:n,styles:o}=e,l=t?.justifyContent??n?.justifyContent,a=t?.horizontalAlignment??n?.horizontalAlignment,r=(0,i.useStyles)(o),f=(0,s.useBlockProps)({className:c()(A),style:{...r,justifyContent:l,alignItems:a}}),{children:g,...d}=(0,s.useInnerBlocksProps)(f,{templateLock:!1,orientation:"vertical"});return(0,u.jsx)("div",{...d,children:g})},g=n(6427),d=n(7723),v=n(2709),y=n(8534),p=n(6537),h=n(2055),j=n(5103),x=n(8994),C=n(6487);const b=[{value:"flex-start",label:(0,d.__)("Top","fooconvert"),icon:v.A},{value:"center",label:(0,d.__)("Center","fooconvert"),icon:y.A},{value:"flex-end",label:(0,d.__)("Bottom","fooconvert"),icon:p.A}],_=[{value:"flex-start",label:(0,d.__)("Left","fooconvert"),icon:h.A},{value:"center",label:(0,d.__)("Center","fooconvert"),icon:j.A},{value:"flex-end",label:(0,d.__)("Right","fooconvert"),icon:x.A},{value:"stretch",label:(0,d.__)("Stretch","fooconvert"),icon:C.A}];var m=e=>{const{clientId:t,settings:n,setSettings:o,settingsDefaults:l,styles:a,setStyles:r,stylesDefaults:c}=e;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.InspectorControls,{group:"settings",children:(0,u.jsxs)(g.PanelBody,{title:(0,d.__)("Layout","fooconvert"),initialOpen:!1,children:[(0,u.jsx)(g.PanelRow,{children:(0,u.jsx)(i.ToggleSelectControl,{label:(0,d.__)("Vertical","fooconvert"),value:n?.justifyContent??l?.justifyContent,onChange:e=>o({justifyContent:e!==l?.justifyContent?e:void 0}),options:b,iconOnly:!0})}),(0,u.jsx)(g.PanelRow,{children:(0,u.jsx)(i.ToggleSelectControl,{label:(0,d.__)("Horizontal","fooconvert"),value:n?.horizontalAlignment??l?.horizontalAlignment,onChange:e=>o({horizontalAlignment:e!==l?.horizontalAlignment?e:void 0}),options:_,iconOnly:!0})})]})}),(0,u.jsxs)(s.InspectorControls,{group:"styles",children:[(0,u.jsx)(i.ColorToolsPanel,{panelId:t,value:a?.color,onChange:e=>r({color:e}),options:[{key:"background",label:(0,d.__)("Background","fooconvert"),enableAlpha:!0,enableGradient:!0},{key:"text",label:(0,d.__)("Text","fooconvert")}],defaults:c?.color}),(0,u.jsx)(i.BackgroundImagePanel,{panelId:t,value:a,defaultValues:c,onChange:r}),(0,u.jsx)(i.BorderToolsPanel,{panelId:t,value:a?.border,onChange:e=>r({border:e}),defaults:c?.border,shownByDefault:[]}),(0,u.jsx)(i.DimensionToolsPanel,{panelId:t,value:a?.dimensions,onChange:e=>r({dimensions:e}),controls:["padding","margin","gap"],defaults:c?.dimensions})]})]})};const A="fc--split-layout-panel",k={settings:{justifyContent:"center",horizontalAlignment:"center"},styles:{dimensions:{gap:"12px"}}};(0,o.registerBlockType)(a.UU,{icon:l.A,edit:e=>{const{attributes:{settings:t,styles:n},setAttributes:o}=e,s={...k},l={...s?.settings??{}},a={...s?.styles??{}},r={...e,attributesDefaults:s,settings:t,setSettings:e=>o({settings:(0,i.$object)(t,e)}),settingsDefaults:l,styles:n,setStyles:e=>o({styles:(0,i.$object)(n,e)}),stylesDefaults:a};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(f,{...r}),(0,u.jsx)(m,{...r})]})},save:()=>(0,u.jsx)(s.InnerBlocks.Content,{})})},8908:function(e){e.exports=window.FooConvert.editor}},function(e){e(e.s=6229)}]);