!function(){"use strict";var e,t={618:function(e,t,n){var r=window.wp.blocks,o=window.wp.element,u=window.wp.components,i=window.wp.blockEditor,c=(window.wp.richText,window.wp.i18n),a=window.wp.apiFetch,l=n.n(a),p=JSON.parse('{"u2":"wpboutik/grid-of-products"}');(0,r.registerBlockType)(p.u2,{edit:function(e){let{attributes:t,setAttributes:n}=e;const r=(0,i.useBlockProps)();return l()({path:"/wp/v2/wpboutik_product?per_page=5"}).then((e=>{n({products:e})}),(e=>{})),(0,o.createElement)("div",r,(0,o.createElement)(u.TextControl,{label:(0,c.__)("Titre du bloc","wpboutik"),value:t.message,onChange:e=>n({message:e})}),(0,o.createElement)(u.__experimentalNumberControl,{label:(0,c.__)("Nombre de produits","wpboutik"),value:t.nb_products,onChange:e=>n({nb_products:e})}))},save:function(e){let{attributes:t}=e;const n=i.useBlockProps.save(),r=t.products;return(0,o.createElement)("div",n,(0,o.createElement)("h2",null,t.message),r&&(0,o.createElement)("ul",null,r.map((e=>(0,o.createElement)("li",{key:e.id},(0,o.createElement)("a",{href:e.link},e.title.rendered))))))}})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var u=n[e]={exports:{}};return t[e](u,u.exports,r),u.exports}r.m=t,e=[],r.O=function(t,n,o,u){if(!n){var i=1/0;for(p=0;p<e.length;p++){n=e[p][0],o=e[p][1],u=e[p][2];for(var c=!0,a=0;a<n.length;a++)(!1&u||i>=u)&&Object.keys(r.O).every((function(e){return r.O[e](n[a])}))?n.splice(a--,1):(c=!1,u<i&&(i=u));if(c){e.splice(p--,1);var l=o();void 0!==l&&(t=l)}}return t}u=u||0;for(var p=e.length;p>0&&e[p-1][2]>u;p--)e[p]=e[p-1];e[p]=[n,o,u]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,u,i=n[0],c=n[1],a=n[2],l=0;if(i.some((function(t){return 0!==e[t]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(a)var p=a(r)}for(t&&t(n);l<i.length;l++)u=i[l],r.o(e,u)&&e[u]&&e[u][0](),e[u]=0;return r.O(p)},n=self.webpackChunkwpboutik=self.webpackChunkwpboutik||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o=r.O(void 0,[431],(function(){return r(618)}));o=r.O(o)}();