!function(){"use strict";var e={7005:function(e,t,r){var o=r(1609),n=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,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,c={},i=null,p=null;for(o in void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(p=t.ref),t)a.call(t,o)&&!s.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:n,type:e,key:i,ref:p,props:c,_owner:l.current}}},9255:function(e,t,r){e.exports=r(7005)},1609:function(e){e.exports=window.React}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}!function(){var e=window.wp.blocks,t=window.wp.primitives,o=r(9255),n=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),a=window.wp.i18n,l=window.wp.coreData,s=window.wp.data,c=window.wp.blockEditor,i=window.wp.components;const p=[["surecart/product-list-filter-checkboxes-label"],["surecart/product-list-filter-checkboxes-template"]];var u=JSON.parse('{"UU":"surecart/product-list-filter-checkboxes"}');(0,e.registerBlockType)(u.UU,{icon:n,edit:e=>{let{attributes:{taxonomy:t},setAttributes:r}=e;const o=(0,c.useBlockProps)(),n=(0,c.useInnerBlocksProps)(o,{template:p}),{records:s}=(0,l.useEntityRecords)("root","taxonomy",{per_page:-1}),u=(s??[]).filter((e=>e.types.includes("sc_product")&&e?.visibility.public));return React.createElement(React.Fragment,null,React.createElement(c.InspectorControls,null,React.createElement(i.PanelBody,{title:(0,a.__)("Settings")},Array.isArray(u)&&React.createElement(i.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Taxonomy"),options:u.map((e=>({label:e.name,value:e.slug}))),value:t,onChange:e=>r({taxonomy:e,label:u.find((t=>t.slug===e))?.name??(0,a.__)("Filter","surecart")})}))),React.createElement("div",n))},save:function(){return React.createElement(c.InnerBlocks.Content,null)},__experimentalLabel:e=>{const t=(0,s.select)(l.store).getEntityRecords("root","taxonomy",{per_page:-1});if(!t)return!1;const r=t.find((t=>t.slug===e?.taxonomy));return!(!r||!r?.name)&&r.name}})}()}();