!function(){var t={7005:function(t,e,r){"use strict";var o=r(1609),n=Symbol.for("react.element"),s=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};e.jsx=function(t,e,r){var o,c={},u=null,l=null;for(o in void 0!==r&&(u=""+r),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(l=e.ref),e)s.call(e,o)&&!a.hasOwnProperty(o)&&(c[o]=e[o]);if(t&&t.defaultProps)for(o in e=t.defaultProps)void 0===c[o]&&(c[o]=e[o]);return{$$typeof:n,type:t,key:u,ref:l,props:c,_owner:i.current}}},9255:function(t,e,r){"use strict";t.exports=r(7005)},1609:function(t){"use strict";t.exports=window.React},3373:function(t,e){var r;!function(){"use strict";var o={}.hasOwnProperty;function n(){for(var t="",e=0;e<arguments.length;e++){var r=arguments[e];r&&(t=i(t,s(r)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var r in t)o.call(t,r)&&t[r]&&(e=i(e,r));return e}function i(t,e){return e?t?t+" "+e:t+e:t}t.exports?(n.default=n,t.exports=n):void 0===(r=function(){return n}.apply(e,[]))||(t.exports=r)}()}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,r),s.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=window.wp.blocks,e=window.wp.primitives,o=r(9255),n=(0,o.jsx)(e.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(e.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"})}),s=r(3373),i=r.n(s),a=window.wp.blockEditor,c=window.wp.data,u=window.wp.i18n;const l="surecart/product-buy-button",p=[l,"surecart/product-selected-price-ad-hoc-amount"];var f=JSON.parse('{"UU":"surecart/product-buy-buttons"}');(0,t.registerBlockType)(f.UU,{edit:t=>{let{attributes:e,className:r}=t;const{fontSize:o,layout:n,style:s}=e,f=(0,a.useBlockProps)({className:i()(r,{"wp-block-buttons":!0,"has-custom-font-size":o||s?.typography?.fontSize})}),d=(0,c.useSelect)((t=>{const e=t(a.store).getSettings().__experimentalPreferredStyleVariations;return e?.value?.[l]}),[]),y=(0,a.useInnerBlocksProps)(f,{allowedBlocks:p,template:[[l,{className:d&&`is-style-${d}`,text:(0,u.__)("Add To Cart","surecart"),add_to_cart:!0,width:100}],[l,{className:d?`is-style-${d}`:"is-style-outline",text:(0,u.__)("Buy Now","surecart"),add_to_cart:!1,width:100,style:"outline"}]],templateInsertUpdatesSelection:!0,orientation:n?.orientation??"horizontal"});return React.createElement("div",y)},save:function(t){let{attributes:e,className:r}=t;const{fontSize:o,style:n,contentJustification:s,orientation:c}=e,u=a.useBlockProps.save({className:i()(r,{"wp-block-buttons":!0,"sc-block-buttons":!0,"is-layout-flex":!0,"has-custom-font-size":o||n?.typography?.fontSize,[`is-content-justification-${s}`]:s,"is-vertical":"vertical"===c})}),l=a.useInnerBlocksProps.save(u);return React.createElement("div",l)},icon:n})}()}();