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