!function(){"use strict";var e,r={7005:function(e,r,t){var n=t(1609),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};r.jsx=function(e,r,t){var n,i={},u=null,s=null;for(n in void 0!==t&&(u=""+t),void 0!==r.key&&(u=""+r.key),void 0!==r.ref&&(s=r.ref),r)a.call(r,n)&&!c.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:u,ref:s,props:i,_owner:l.current}}},9255:function(e,r,t){e.exports=t(7005)},7899:function(e,r,t){var n=window.wp.blocks,o=window.wp.primitives,a=t(9255),l=(0,a.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(o.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})}),c=window.wp.blockEditor,i=window.wp.components,u=window.wp.i18n,s=t(1609),p=t.n(s);function f(e){let{name:r,...t}=e;const[n,o]=(0,s.useState)(null),a=window?.scData?.plugin_url+"/dist/icon-assets";if((0,s.useEffect)((()=>{fetch(`${a}/${r}.svg`).then((e=>e.text())).then((e=>{const r=(new DOMParser).parseFromString(e,"image/svg+xml");o(r?.documentElement)})).catch(console.error)}),[r]),!n)return null;const l={...Array.from(n.attributes).reduce(((e,r)=>(e[r.name.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))]=r.value,e)),{}),...t};return p().createElement(n.tagName,{...l,dangerouslySetInnerHTML:{__html:n.innerHTML}})}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},v.apply(null,arguments)}const _={arrow:(0,u.isRTL)()?"arrow-left":"arrow-right",chevron:(0,u.isRTL)()?"chevron-left":"chevron-right",x:"x"};var w=JSON.parse('{"UU":"surecart/cart-close-button"}');(0,n.registerBlockType)(w.UU,{icon:l,edit:e=>{let{attributes:{label:r,showLabel:t,icon:n},setAttributes:o}=e;const a=_[n],l=(0,c.useBlockProps)({className:"has-arrow-type-"+n});return React.createElement(React.Fragment,null,React.createElement(c.InspectorControls,null,React.createElement(i.PanelBody,null,React.createElement(i.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,u.__)("Arrow","surecart"),value:n,onChange:e=>o({icon:e}),help:(0,u.__)("A decorative arrow appended to the next and previous page link.","surecart"),isBlock:!0},React.createElement(i.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,u._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks","surecart")}),React.createElement(i.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,u._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks","surecart")}),React.createElement(i.__experimentalToggleGroupControlOption,{value:"x",label:(0,u._x)("Close","Arrow option for Query Pagination Next/Previous blocks","surecart")})))),React.createElement("div",v({role:"button",tabIndex:0,"aria-label":(0,u.__)("Close cart","surecart"),onClick:e=>e.preventDefault()},l),t&&React.createElement(c.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,u.__)("Close cart","surecart"),placeholder:(0,u.__)("Close","surecart"),value:r,onChange:e=>o({label:e})}),!!a&&React.createElement(f,{name:a,className:"wp-block-surecart-cart-close-button__icon","aria-hidden":!0})))}})},1609:function(e){e.exports=window.React}},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var a=t[e]={exports:{}};return r[e](a,a.exports,n),a.exports}n.m=r,e=[],n.O=function(r,t,o,a){if(!t){var l=1/0;for(s=0;s<e.length;s++){t=e[s][0],o=e[s][1],a=e[s][2];for(var c=!0,i=0;i<t.length;i++)(!1&a||l>=a)&&Object.keys(n.O).every((function(e){return n.O[e](t[i])}))?t.splice(i--,1):(c=!1,a<l&&(l=a));if(c){e.splice(s--,1);var u=o();void 0!==u&&(r=u)}}return r}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[t,o,a]},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,{a:r}),r},n.d=function(e,r){for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},function(){var e={2407:0,8207:0};n.O.j=function(r){return 0===e[r]};var r=function(r,t){var o,a,l=t[0],c=t[1],i=t[2],u=0;if(l.some((function(r){return 0!==e[r]}))){for(o in c)n.o(c,o)&&(n.m[o]=c[o]);if(i)var s=i(n)}for(r&&r(t);u<l.length;u++)a=l[u],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(s)},t=self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))}();var o=n.O(void 0,[8207],(function(){return n(7899)}));o=n.O(o)}();