(()=>{"use strict";var e,i={1904:()=>{const e=window.wp.blocks,i=window.wp.i18n,s=window.wp.blockEditor,r=window.wp.components,c=window.ReactJSXRuntime,l=JSON.parse('{"UU":"carhop-blocks/our-collection"}');(0,e.registerBlockType)(l.UU,{icon:{foreground:"#146F63",src:(0,c.jsxs)("svg",{"data-name":"Calque 1",xmlns:"http://www.w3.org/2000/svg",width:"592.3",height:"592.3",viewBox:"0 0 592.3 592.3",children:[(0,c.jsx)("path",{d:"M83.6,271.6C37.3,271.6,0,234.4,0,188v-104.5C0,37.3,37.3,0,83.6,0h104.5c46.3,0,83.6,37.3,83.6,83.6v104.5c0,46.3-37.3,83.6-83.6,83.6h-104.5Z",fill:"#146F63"}),(0,c.jsx)("polygon",{points:"443.6 9.4 300.9 256.5 586.2 256.5 443.6 9.4",fill:"#146F63"}),(0,c.jsx)("circle",{cx:"135.8",cy:"455.6",r:"135.8",fill:"#146F63"}),(0,c.jsx)("polygon",{points:"505.3 334.3 364.3 334.3 293.8 456.4 364.3 578.5 505.3 578.5 575.8 456.4 505.3 334.3",fill:"#146F63"})]})},edit:function({attributes:e,setAttributes:l}){const{imageId:a,imageUrl:o}=e,n=e=>{l({imageId:e.id,imageUrl:e.url})};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(s.BlockControls,{children:[(0,c.jsx)(s.MediaReplaceFlow,{mediaId:a,mediaUrl:o,allowedTypes:["image"],accept:"image/*",onSelect:n,name:o?"Remplacer":"Ajouter"}),(0,c.jsx)(r.ToolbarButton,{onClick:()=>{l({imageId:0,imageUrl:""})},children:(0,i.__)("Retirer","carhop-blocks")})]}),(0,c.jsxs)("section",{...(0,s.useBlockProps)({className:"our-collections"}),children:[o?(0,c.jsx)("img",{src:o,className:"our-collections__selected-image",alt:""}):(0,c.jsx)(s.MediaPlaceholder,{onSelect:n,allowedTypes:["image"],accept:"image/*",multiple:!1,labels:{title:(0,i.__)("Sélectionner une image","carhop-blocks")}}),(0,c.jsx)("div",{className:"our-collections__innerblocks",children:(0,c.jsx)(s.InnerBlocks,{allowedBlocks:["core/heading","core/paragraph","carhop-blocks/heading"]})}),o&&(0,c.jsx)("img",{src:o,alt:""}),(0,c.jsxs)("div",{className:"redirection-grid",children:[(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Archives"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Documentation"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Images fixes"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Audio"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Images animées"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Objets"})]}),(0,c.jsx)("a",{href:"/collections",className:"see-all",children:"Voir toutes nos collections"}),(0,c.jsx)("div",{className:"background-shape"})]})]})},save:function({attributes:e}){const{imageUrl:i}=e;return(0,c.jsxs)("section",{...s.useBlockProps.save({className:"our-collections"}),children:[i?(0,c.jsx)("img",{src:i,className:"our-collections__selected-image",alt:""}):null,(0,c.jsx)("div",{className:"our-collections__innerblocks",children:(0,c.jsx)(s.InnerBlocks.Content,{})}),(0,c.jsxs)("div",{className:"redirection-grid",children:[(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Archives"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Documentation"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Images fixes"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Audio"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Images animées"}),(0,c.jsx)("a",{className:"redirection-grid__item",href:"/Archives",children:"Objets"})]}),(0,c.jsx)("a",{href:"/collections",className:"see-all",children:"Voir toutes nos collections"}),(0,c.jsx)("div",{className:"background-shape"})]})}})}},s={};function r(e){var c=s[e];if(void 0!==c)return c.exports;var l=s[e]={exports:{}};return i[e](l,l.exports,r),l.exports}r.m=i,e=[],r.O=(i,s,c,l)=>{if(!s){var a=1/0;for(d=0;d<e.length;d++){for(var[s,c,l]=e[d],o=!0,n=0;n<s.length;n++)(!1&l||a>=l)&&Object.keys(r.O).every(e=>r.O[e](s[n]))?s.splice(n--,1):(o=!1,l<a&&(a=l));if(o){e.splice(d--,1);var t=c();void 0!==t&&(i=t)}}return i}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[s,c,l]},r.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={9945:0,4893:0};r.O.j=i=>0===e[i];var i=(i,s)=>{var c,l,[a,o,n]=s,t=0;if(a.some(i=>0!==e[i])){for(c in o)r.o(o,c)&&(r.m[c]=o[c]);if(n)var d=n(r)}for(i&&i(s);t<a.length;t++)l=a[t],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(d)},s=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];s.forEach(i.bind(null,0)),s.push=i.bind(null,s.push.bind(s))})();var c=r.O(void 0,[4893],()=>r(1904));c=r.O(c)})();