(()=>{"use strict";var e,t={655:()=>{const e=window.wp.element,t=window.wp.blocks,n=window.wp.i18n,o=window.wp.blockEditor,r=window.wp.components,l=window.wp.data,s=JSON.parse('{"u2":"crosswinds-blocks/comments-number"}');(0,t.registerBlockType)(s.u2,{icon:{src:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"20",viewBox:"0 0 640 512"},(0,e.createElement)("path",{class:"fa-secondary",fill:"#8200ff",d:"M256 352v32c0 35.3 28.7 64 64 64H437.3l81.1 60.8c4.8 3.6 11.3 4.2 16.8 1.5s8.8-8.2 8.8-14.3V448h32c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H448V256c0 53-43 96-96 96H256z"}),(0,e.createElement)("path",{class:"fa-primary",fill:"#171247",d:"M0 64C0 28.7 28.7 0 64 0H352c35.3 0 64 28.7 64 64V256c0 35.3-28.7 64-64 64H202.7l-81.1 60.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V320H64c-35.3 0-64-28.7-64-64V64z"}))},edit:function(t){const{attributes:s,setAttributes:c,context:a}=t,{singularCommentText:i,pluralCommentText:m}=s,{postId:u}=a,p=(0,l.useSelect)((e=>e("core").getEntityRecords("root","comment",{post:u})));let w;w=null===p?"0 "+m:1===p.length?p.length+" "+i:p.length+" "+m,""===i&&c({singularCommentText:(0,n.__)("Comment","crosswinds-blocks")}),""===m&&c({pluralCommentText:(0,n.__)("Comments","crosswinds-blocks")});const d=(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(r.PanelBody,{title:(0,n.__)("Comments Number Settings","crosswinds-blocks")},(0,e.createElement)(r.TextControl,{label:(0,n.__)("Singular Comment Text","crosswinds-blocks"),value:i,onChange:e=>c({singularCommentText:e})}),(0,e.createElement)(r.TextControl,{label:(0,n.__)("Plural Comment Text","crosswinds-blocks"),value:m,onChange:e=>c({pluralCommentText:e})}))));return(0,e.createElement)(e.Fragment,null,d,(0,e.createElement)("p",(0,o.useBlockProps)(),w))}})}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=(t,n,r,l)=>{if(!n){var s=1/0;for(m=0;m<e.length;m++){for(var[n,r,l]=e[m],c=!0,a=0;a<n.length;a++)(!1&l||s>=l)&&Object.keys(o.O).every((e=>o.O[e](n[a])))?n.splice(a--,1):(c=!1,l<s&&(s=l));if(c){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]=[n,r,l]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={1097:0,6429:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,[s,c,a]=n,i=0;if(s.some((t=>0!==e[t]))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(a)var m=a(o)}for(t&&t(n);i<s.length;i++)l=s[i],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(m)},n=globalThis.webpackChunkstarter_block=globalThis.webpackChunkstarter_block||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[6429],(()=>o(655)));r=o.O(r)})();