(()=>{"use strict";var e={n:s=>{var o=s&&s.__esModule?()=>s.default:()=>s;return e.d(o,{a:o}),o},d:(s,o)=>{for(var l in o)e.o(o,l)&&!e.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:o[l]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.blocks,o=window.wp.blockEditor,l=window.wp.serverSideRender;var n=e.n(l);const t=window.wp.components,r=JSON.parse('{"UU":"ggmc/order-confirmation"}'),i=window.ReactJSXRuntime;(0,s.registerBlockType)(r.UU,{edit:({attributes:e,setAttributes:s})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.InspectorControls,{children:[(0,i.jsxs)(t.PanelBody,{title:"Success Message",children:[(0,i.jsx)(t.ToggleControl,{label:"Show Success Icon",checked:"yes"===e.showSuccessIcon,onChange:e=>s({showSuccessIcon:e?"yes":""})}),(0,i.jsx)(t.TextControl,{label:"Success Title",value:e.successTitle,onChange:e=>s({successTitle:e})}),(0,i.jsx)(t.TextControl,{label:"Success Message",value:e.successMessage,onChange:e=>s({successMessage:e})}),(0,i.jsx)(t.TextControl,{label:"No Order Message",value:e.noOrderMessage,onChange:e=>s({noOrderMessage:e})})]}),(0,i.jsxs)(t.PanelBody,{title:"Content Visibility",initialOpen:!1,children:[(0,i.jsx)(t.ToggleControl,{label:"Show Order Number",checked:"yes"===e.showOrderNumber,onChange:e=>s({showOrderNumber:e?"yes":""})}),(0,i.jsx)(t.ToggleControl,{label:"Show Order Date",checked:"yes"===e.showOrderDate,onChange:e=>s({showOrderDate:e?"yes":""})}),(0,i.jsx)(t.ToggleControl,{label:"Show Order Items",checked:"yes"===e.showOrderItems,onChange:e=>s({showOrderItems:e?"yes":""})}),"yes"===e.showOrderItems&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.ToggleControl,{label:"Show Order Items Title",checked:"yes"===e.showOrderItemsTitle,onChange:e=>s({showOrderItemsTitle:e?"yes":""})}),"yes"===e.showOrderItemsTitle&&(0,i.jsx)(t.TextControl,{label:"Order Items Title",value:e.orderItemsTitle,onChange:e=>s({orderItemsTitle:e})})]}),(0,i.jsx)(t.ToggleControl,{label:"Show Order Totals",checked:"yes"===e.showTotals,onChange:e=>s({showTotals:e?"yes":""})}),"yes"===e.showTotals&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.ToggleControl,{label:"Show Order Summary Title",checked:"yes"===e.showTotalsTitle,onChange:e=>s({showTotalsTitle:e?"yes":""})}),"yes"===e.showTotalsTitle&&(0,i.jsx)(t.TextControl,{label:"Order Summary Title",value:e.totalsTitle,onChange:e=>s({totalsTitle:e})})]}),(0,i.jsx)(t.ToggleControl,{label:"Show Payment Method",checked:"yes"===e.showPaymentMethod,onChange:e=>s({showPaymentMethod:e?"yes":""})})]}),(0,i.jsxs)(t.PanelBody,{title:"Addresses",initialOpen:!1,children:[(0,i.jsx)(t.ToggleControl,{label:"Show Billing Address",checked:"yes"===e.showBillingAddress,onChange:e=>s({showBillingAddress:e?"yes":""})}),"yes"===e.showBillingAddress&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.ToggleControl,{label:"Show Billing Address Title",checked:"yes"===e.showBillingAddressTitle,onChange:e=>s({showBillingAddressTitle:e?"yes":""})}),"yes"===e.showBillingAddressTitle&&(0,i.jsx)(t.TextControl,{label:"Billing Address Title",value:e.billingAddressTitle,onChange:e=>s({billingAddressTitle:e})})]}),(0,i.jsx)(t.ToggleControl,{label:"Show Shipping Address",checked:"yes"===e.showShippingAddress,onChange:e=>s({showShippingAddress:e?"yes":""})}),"yes"===e.showShippingAddress&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.ToggleControl,{label:"Show Shipping Address Title",checked:"yes"===e.showShippingAddressTitle,onChange:e=>s({showShippingAddressTitle:e?"yes":""})}),"yes"===e.showShippingAddressTitle&&(0,i.jsx)(t.TextControl,{label:"Shipping Address Title",value:e.shippingAddressTitle,onChange:e=>s({shippingAddressTitle:e})})]})]}),(0,i.jsxs)(t.PanelBody,{title:"Continue Shopping",initialOpen:!1,children:[(0,i.jsx)(t.ToggleControl,{label:"Show Continue Shopping Button",checked:"yes"===e.showContinueShopping,onChange:e=>s({showContinueShopping:e?"yes":""})}),"yes"===e.showContinueShopping&&(0,i.jsx)(t.TextControl,{label:"Continue Shopping Text",value:e.continueShoppingText,onChange:e=>s({continueShoppingText:e})})]})]}),(0,i.jsx)(n(),{block:r.UU,attributes:e})]}),save:()=>null})})();