(()=>{"use strict";var e,t,o,r={8525:(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