(()=>{var e,t,o,r={5057:(e,t,o)=>{"use strict";o.r(t);var r=o(1609);const l=window.wp.blocks;var c=o(7104),n=o(5573);const a=(0,r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),(0,r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"})),s=JSON.parse('{"name":"woocommerce/catalog-sorting","version":"1.0.0","title":"Catalog Sorting","description":"Enable customers to change the sorting order of the products.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"color":{"text":true,"background":false},"typography":{"fontSize":true}},"attributes":{"fontSize":{"type":"string","default":"small"},"useLabel":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),i=window.wp.blockEditor,m=window.wp.components;var u=o(7723);const p=({useLabel:e})=>(0,r.createElement)(r.Fragment,null,e?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("label",{className:"orderby-label",htmlFor:"woocommerce-orderby"},(0,u.__)("Sort by","woocommerce")),(0,r.createElement)("select",{className:"orderby",id:"woocommerce-orderby"},(0,r.createElement)("option",null,(0,u.__)("Default","woocommerce")))):(0,r.createElement)("select",{className:"orderby"},(0,r.createElement)("option",null,(0,u.__)("Default sorting","woocommerce"))));o(8528),(0,l.registerBlockType)(s,{icon:{src:(0,r.createElement)(c.A,{icon:a,className:"wc-block-editor-components-block-icon"})},attributes:{...s.attributes},edit:({attributes:e,setAttributes:t})=>{const{useLabel:o}=e,l=(0,i.useBlockProps)({className:"woocommerce wc-block-catalog-sorting"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(m.PanelBody,{title:(0,u.__)("Accessibility","woocommerce")},(0,r.createElement)(m.ToggleControl,{label:(0,u.__)("Show visual label","woocommerce"),help:(0,u.__)('Displays "Sort by" text before the dropdown menu to improve clarity and accessibility.',"woocommerce"),checked:o,onChange:e=>t({useLabel:e})}))),(0,r.createElement)("div",{...l},(0,r.createElement)(m.Disabled,null,(0,r.createElement)(p,{useLabel:o}))))},save:()=>null})},8528:()=>{},1609:e=>{"use strict";e.exports=window.React},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return r[e].call(o.exports,o,o.exports,c),o.exports}c.m=r,e=[],c.O=(t,o,r,l)=>{if(!o){var n=1/0;for(m=0;m<e.length;m++){for(var[o,r,l]=e[m],a=!0,s=0;s<o.length;s++)(!1&l||n>=l)&&Object.keys(c.O).every((e=>c.O[e](o[s])))?o.splice(s--,1):(a=!1,l<n&&(n=l));if(a){e.splice(m--,1);var i=r();void 0!==i&&(t=i)}}return t}l=l||0;for(var m=e.length;m>0&&e[m-1][2]>l;m--)e[m]=e[m-1];e[m]=[o,r,l]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var l=Object.create(null);c.r(l);var n={};t=t||[null,o({}),o([]),o(o)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,c.d(l,n),l},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.j=7619,(()=>{var e={7619:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,l,[n,a,s]=o,i=0;if(n.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(s)var m=s(c)}for(t&&t(o);i<n.length;i++)l=n[i],c.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return c.O(m)},o=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=c.O(void 0,[94],(()=>c(5057)));n=c.O(n),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["catalog-sorting"]=n})();