(()=>{"use strict";var e={n:n=>{var l=n&&n.__esModule?()=>n.default:()=>n;return e.d(l,{a:l}),l},d:(n,l)=>{for(var a in l)e.o(l,a)&&!e.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:l[a]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.wp.blocks,l=window.wp.blockEditor,a=window.wp.serverSideRender;var o=e.n(a);const t=window.wp.components,i=JSON.parse('{"UU":"ggmc/checkout"}'),s=window.ReactJSXRuntime,r=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"div",value:"div"},{label:"span",value:"span"},{label:"p",value:"p"}];(0,n.registerBlockType)(i.UU,{edit:({attributes:e,setAttributes:n})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l.InspectorControls,{children:[(0,s.jsxs)(t.PanelBody,{title:"Checkout Settings",children:[(0,s.jsx)(t.ToggleControl,{label:"Show Shipping Fields",checked:"yes"===e.showShippingFields,onChange:e=>n({showShippingFields:e?"yes":""})}),(0,s.jsx)(t.ToggleControl,{label:"Enable Order Notes",checked:"yes"===e.enableOrderNotes,onChange:e=>n({enableOrderNotes:e?"yes":""})})]}),(0,s.jsxs)(t.PanelBody,{title:"Section Headings",initialOpen:!1,children:[(0,s.jsx)(t.TextControl,{label:"Customer Information Heading",value:e.customerInfoHeading,onChange:e=>n({customerInfoHeading:e})}),(0,s.jsx)(t.SelectControl,{label:"Customer Info HTML Tag",value:e.customerInfoHeadingTag,options:r,onChange:e=>n({customerInfoHeadingTag:e})}),"yes"===e.showShippingFields&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.TextControl,{label:"Shipping Heading",value:e.shippingHeading,onChange:e=>n({shippingHeading:e})}),(0,s.jsx)(t.SelectControl,{label:"Shipping HTML Tag",value:e.shippingHeadingTag,options:r,onChange:e=>n({shippingHeadingTag:e})})]}),(0,s.jsx)(t.TextControl,{label:"Billing Heading",value:e.billingHeading,onChange:e=>n({billingHeading:e})}),(0,s.jsx)(t.SelectControl,{label:"Billing HTML Tag",value:e.billingHeadingTag,options:r,onChange:e=>n({billingHeadingTag:e})}),(0,s.jsx)(t.TextControl,{label:"Payment Heading",value:e.paymentHeading,onChange:e=>n({paymentHeading:e})}),(0,s.jsx)(t.SelectControl,{label:"Payment HTML Tag",value:e.paymentHeadingTag,options:r,onChange:e=>n({paymentHeadingTag:e})}),(0,s.jsx)(t.TextControl,{label:"Order Summary Heading",value:e.orderSummaryHeading,onChange:e=>n({orderSummaryHeading:e})}),(0,s.jsx)(t.SelectControl,{label:"Order Summary HTML Tag",value:e.orderSummaryHeadingTag,options:r,onChange:e=>n({orderSummaryHeadingTag:e})})]}),(0,s.jsxs)(t.PanelBody,{title:"Order Summary Settings",initialOpen:!1,children:[(0,s.jsx)(t.ToggleControl,{label:"Show Product Images",checked:"yes"===e.showProductImages,onChange:e=>n({showProductImages:e?"yes":""})}),(0,s.jsx)(t.ToggleControl,{label:"Link Product Name",checked:"yes"===e.linkProductName,onChange:e=>n({linkProductName:e?"yes":""})}),(0,s.jsx)(t.ToggleControl,{label:"Sticky Order Summary",checked:"yes"===e.orderSummarySticky,onChange:e=>n({orderSummarySticky:e?"yes":""})})]}),(0,s.jsxs)(t.PanelBody,{title:"Discount Code",initialOpen:!1,children:[(0,s.jsx)(t.ToggleControl,{label:"Show Discount Input",checked:"yes"===e.showDiscountInput,onChange:e=>n({showDiscountInput:e?"yes":""})}),"yes"===e.showDiscountInput&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.ToggleControl,{label:"Collapsible",checked:"yes"===e.discountCollapsible,onChange:e=>n({discountCollapsible:e?"yes":""})}),(0,s.jsx)(t.TextControl,{label:"Label Text",value:e.discountLabel,onChange:e=>n({discountLabel:e})}),(0,s.jsx)(t.TextControl,{label:"Input Placeholder",value:e.discountPlaceholder,onChange:e=>n({discountPlaceholder:e})}),(0,s.jsx)(t.TextControl,{label:"Button Text",value:e.discountButtonText,onChange:e=>n({discountButtonText:e})})]})]})]}),(0,s.jsx)(o(),{block:i.UU,attributes:e})]}),save:()=>null})})();