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