!function(){"use strict";var e,t={7005:function(e,t,r){var o=r(1609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,i={},u=null,s=null;for(o in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:u,ref:s,props:i,_owner:l.current}}},9255:function(e,t,r){e.exports=r(7005)},6977:function(e,t,r){var o=window.wp.blocks,n=window.wp.primitives,a=r(9255),l=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})}),c=window.wp.blockEditor,i=window.wp.components,u=window.wp.i18n,s=JSON.parse('{"UU":"surecart/cart-line-item-remove"}');(0,o.registerBlockType)(s.UU,{edit:e=>{let{attributes:t,setAttributes:r,context:{removable:o=!0}}=e;const{show_label:n,label:a,icon:l}=t,s=(0,c.useBlockProps)();return o?React.createElement(React.Fragment,null,React.createElement(c.InspectorControls,null,React.createElement(i.PanelBody,{title:(0,u.__)("Settings","surecart")},React.createElement(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,u.__)("Icon","surecart"),value:l,onChange:e=>r({icon:e}),help:(0,u.__)("Choose an icon for the remove button.","surecart"),isBlock:!0},React.createElement(i.__experimentalToggleGroupControlOption,{value:"none",label:(0,u._x)("None","Icon option for Cart Line Item Remove block","surecart")}),React.createElement(i.__experimentalToggleGroupControlOption,{value:"trash-2",label:(0,u._x)("Trash","Icon option for Cart Line Item Remove block","surecart")}),React.createElement(i.__experimentalToggleGroupControlOption,{value:"x",label:(0,u._x)("Close","Icon option for Cart Line Item Remove block","surecart")})),React.createElement(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Show label text","surecart"),help:(0,u.__)('Toggle off to hide the label text, e.g. "Remove".',"surecart"),onChange:e=>r({show_label:e}),checked:!0===n}))),React.createElement("div",s,"none"!==l&&React.createElement("sc-icon",{name:l}),n&&React.createElement(c.RichText,{"aria-label":(0,u.__)("Label text","surecart"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"],value:a,onChange:e=>r({label:e}),placeholder:(0,u.__)("Remove","surecart")}))):null},icon:l})},1609:function(e){e.exports=window.React}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=function(t,r,n,a){if(!r){var l=1/0;for(s=0;s<e.length;s++){r=e[s][0],n=e[s][1],a=e[s][2];for(var c=!0,i=0;i<r.length;i++)(!1&a||l>=a)&&Object.keys(o.O).every((function(e){return o.O[e](r[i])}))?r.splice(i--,1):(c=!1,a<l&&(l=a));if(c){e.splice(s--,1);var u=n();void 0!==u&&(t=u)}}return t}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[r,n,a]},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={5361:0,6181:0};o.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,a,l=r[0],c=r[1],i=r[2],u=0;if(l.some((function(t){return 0!==e[t]}))){for(n in c)o.o(c,n)&&(o.m[n]=c[n]);if(i)var s=i(o)}for(t&&t(r);u<l.length;u++)a=l[u],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(s)},r=self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var n=o.O(void 0,[6181],(function(){return o(6977)}));n=o.O(n)}();