(()=>{"use strict";var e,t,o,r={7533:(e,t,o)=>{const r=window.wp.blocks;var n=o(7715);const i=JSON.parse('{"name":"woocommerce/category-description","title":"Product Category Description","description":"Displays the current category description.","category":"woocommerce","apiVersion":3,"textdomain":"woocommerce","attributes":{"textAlign":{"type":"string"}},"supports":{"align":false,"color":{"background":true,"text":true},"html":false,"spacing":{"margin":true,"padding":true},"typography":true},"usesContext":["termId","termTaxonomy"]}');var a=o(4921),c=o(7723);const s=window.wp.data,l=window.wp.coreData,p=window.wp.blockEditor;var d=o(790);(0,r.registerBlockType)(i,{edit:function({attributes:e,setAttributes:t,context:o}){const{textAlign:r}=e,{termId:n,termTaxonomy:i}=o,u=(0,s.useSelect)((e=>!!n&&e(l.store).canUser("update",{kind:"taxonomy",name:i||"product_cat",id:n})),[n,i]),[g="",m,f]=(0,l.useEntityProp)("taxonomy",i||"product_cat","description",String(n)),w=(0,p.useBlockProps)({className:(0,a.A)({[`has-text-align-${r}`]:r})});let y=(0,d.jsx)("p",{...w,children:(0,c.__)("Category description","woocommerce")});return n&&(y=u?(0,d.jsx)(p.PlainText,{tagName:"p",placeholder:(0,c.__)("No description","woocommerce"),value:g,onChange:e=>m(e),__experimentalVersion:2,...w}):(0,d.jsx)("p",{...w,dangerouslySetInnerHTML:{__html:f?.rendered}})),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.BlockControls,{group:"block",children:(0,d.jsx)(p.AlignmentControl,{value:r,onChange:e=>t({textAlign:e||""})})}),y]})},icon:n.A,save:()=>null})},1609:e=>{e.exports=window.React},790:e=>{e.exports=window.ReactJSXRuntime},7723:e=>{e.exports=window.wp.i18n},5573:e=>{e.exports=window.wp.primitives}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,i),o.exports}i.m=r,e=[],i.O=(t,o,r,n)=>{if(!o){var a=1/0;for(p=0;p<e.length;p++){for(var[o,r,n]=e[p],c=!0,s=0;s<o.length;s++)(!1&n||a>=n)&&Object.keys(i.O).every((e=>i.O[e](o[s])))?o.splice(s--,1):(c=!1,n<a&&(a=n));if(c){e.splice(p--,1);var l=r();void 0!==l&&(t=l)}}return t}n=n||0;for(var p=e.length;p>0&&e[p-1][2]>n;p--)e[p]=e[p-1];e[p]=[o,r,n]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.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 n=Object.create(null);i.r(n);var a={};t=t||[null,o({}),o([]),o(o)];for(var c=2&r&&e;"object"==typeof c&&!~t.indexOf(c);c=o(c))Object.getOwnPropertyNames(c).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,i.d(n,a),n},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=2474,(()=>{var e={2474:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[a,c,s]=o,l=0;if(a.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(s)var p=s(i)}for(t&&t(o);l<a.length;l++)n=a[l],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(p)},o=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var a=i.O(void 0,[94],(()=>i(7533)));a=i.O(a),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["category-description"]=a})();