!function(){"use strict";var e,t={7005:function(e,t,r){var n=r(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};t.jsx=function(e,t,r){var n,i={},u=null,s=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:u,ref:s,props:i,_owner:l.current}}},9255:function(e,t,r){e.exports=r(7005)},2172:function(e,t,r){var n=window.wp.blocks,o=window.wp.primitives,a=r(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:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"})}),c=window.wp.blockEditor,i=window.wp.i18n,u=window.wp.data,s=window.wp.components,p=window.wp.element;function f(e){let{value:t,onChange:r}=e;return React.createElement(s.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Arrow","surecart"),value:t,onChange:r,help:(0,i.__)("A decorative arrow appended to the next and previous page link.","surecart"),isBlock:!0},React.createElement(s.__experimentalToggleGroupControlOption,{value:"none",label:(0,i._x)("None","Arrow option for Query Pagination Next/Previous blocks","surecart")}),React.createElement(s.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,i._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks","surecart")}),React.createElement(s.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,i._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks","surecart")}))}function v(e){let{value:t,onChange:r}=e;return React.createElement(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Show label text","surecart"),help:(0,i.__)('Toggle off to hide the label text, e.g. "Next Page".',"surecart"),onChange:r,checked:!0===t})}const _=[["surecart/product-pagination-previous"],["surecart/product-pagination-numbers"],["surecart/product-pagination-next"]];var w=JSON.parse('{"UU":"surecart/product-pagination"}');(0,n.registerBlockType)(w.UU,{icon:l,edit:e=>{let{clientId:t,attributes:{paginationArrow:r,showLabel:n},setAttributes:o,context:a}=e;const l=(0,c.useBlockProps)(),w=(0,c.useInnerBlocksProps)(l,{template:_});(0,p.useEffect)((()=>{"none"!==r||n||o({showLabel:!0})}),[r,o,n]);const g=(0,u.useSelect)((e=>{const{getBlocks:r}=e(c.store),n=r(t);return n?.find((e=>["surecart/product-pagination-next","surecart/product-pagination-previous"].includes(e.name)))}),[t]);return 1===a?.query?.pages?null:React.createElement(React.Fragment,null,g&&React.createElement(c.InspectorControls,null,React.createElement(s.PanelBody,{title:(0,i.__)("Settings","surecart")},React.createElement(f,{value:r,onChange:e=>{o({paginationArrow:e})}}),"none"!==r&&React.createElement(v,{value:n,onChange:e=>{o({showLabel:e})}}))),React.createElement("nav",w))},save:function(){return React.createElement(c.InnerBlocks.Content,null)}})},1609:function(e){e.exports=window.React}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=function(t,r,o,a){if(!r){var l=1/0;for(s=0;s<e.length;s++){r=e[s][0],o=e[s][1],a=e[s][2];for(var c=!0,i=0;i<r.length;i++)(!1&a||l>=a)&&Object.keys(n.O).every((function(e){return n.O[e](r[i])}))?r.splice(i--,1):(c=!1,a<l&&(l=a));if(c){e.splice(s--,1);var u=o();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,o,a]},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={4535:0,4399:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,a,l=r[0],c=r[1],i=r[2],u=0;if(l.some((function(t){return 0!==e[t]}))){for(o in c)n.o(c,o)&&(n.m[o]=c[o]);if(i)var s=i(n)}for(t&&t(r);u<l.length;u++)a=l[u],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.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 o=n.O(void 0,[4399],(function(){return n(2172)}));o=n.O(o)}();