(()=>{var e={1497:()=>{wp.blocks.registerBlockStyle("core/embed",{name:"stacked-background",label:"Fond empilé"})},3980:()=>{wp.blocks.registerBlockStyle("core/heading",{name:"stroked-after",label:"Titre + trait "})},6417:()=>{wp.blocks.registerBlockStyle("core/pullquote",{name:"testimony",label:"Témoignage",isDefault:!1})},7197:()=>{wp.blocks.registerBlockStyle("core/image",{name:"framed",label:"Encadré",isDefault:!1}),wp.blocks.registerBlockStyle("core/image",{name:"framed-rotated",label:"Encadré pivoté",isDefault:!0}),wp.blocks.registerBlockStyle("core/image",{name:"stacked",label:"Empilé",isDefault:!1})}},t={};function i(o){var s=t[o];if(void 0!==s)return s.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,i),l.exports}(()=>{"use strict";i(3980),i(7197),i(1497);const e=window.wp.blocks,t=window.wp.i18n,o=window.wp.blockEditor,s=window.wp.components,l=window.wp.element,r=window.wp.hooks,n=window.wp.compose,c=window.ReactJSXRuntime;(0,e.registerBlockVariation)("core/list",{name:"iconed-list",title:"Liste avec icônes",description:"Liste dont chaque élément peut avoir une icône personnalisée.",attributes:{className:"is-iconed-list"},scope:["inserter","transform"],isActive:e=>(e&&e.className||"").split(" ").includes("is-iconed-list")}),(0,r.addFilter)("blocks.registerBlockType","am/iconed-list-item-attributes",(e,t)=>"core/list-item"!==t?e:{...e,attributes:{...e.attributes,icon:{type:"string",default:""}}}),(0,r.addFilter)("editor.BlockEdit","am/iconed-list-item-controls",e=>i=>{if("core/list-item"!==i.name)return(0,c.jsx)(e,{...i});const{attributes:r,setAttributes:n}=i,{icon:a}=r,d=[{title:(0,t.__)("Loupe"),value:"loupe"},{title:(0,t.__)("Sablier"),value:"sablier"},{title:(0,t.__)("Cadenas"),value:"cadenas"},{title:(0,t.__)("Check"),value:"check"},{title:(0,t.__)("Loupe Alt"),value:"loupe-alt"},{title:(0,t.__)("Pendule"),value:"pendule"}];return(0,c.jsxs)(l.Fragment,{children:[(0,c.jsx)(e,{...i}),(0,c.jsxs)(o.BlockControls,{children:[(0,c.jsx)(s.ToolbarGroup,{children:(0,c.jsx)(s.ToolbarDropdownMenu,{label:(0,t.__)("Icône du bullet"),className:"iconed-list-item-icon-dropdown",icon:(0,c.jsx)("div",{className:`iconed-list-item-backend-icon-square iconed-list-item-backend-icon-square--${a}`}),controls:d.map(({title:e,value:t})=>({title:e,icon:(0,c.jsx)("div",{className:`iconed-list-item-backend-icon-square iconed-list-item-backend-icon-square--${t}`}),isActive:a===t,onClick:()=>n({icon:t})}))})}),(0,c.jsx)(o.AlignmentToolbar,{value:r.align,onChange:e=>n({align:e})})]})]})}),(0,r.addFilter)("blocks.getSaveContent.extraProps","carhop/iconed-list-item-save-props",(e,t,i)=>"core/list-item"===t.name&&i.icon?(i.icon&&(e={...e,className:(e.className||"")+" has-custom-icon has-custom-icon--"+i.icon}),e):e),(0,r.addFilter)("editor.BlockListBlock","carhop/iconed-list-item-editor-classes",(0,n.createHigherOrderComponent)(e=>t=>{if("core/list-item"!==t.name)return(0,c.jsx)(e,{...t});const i=t.attributes?.icon||"",o=[t.className||"",i?"has-custom-icon":"",i?`has-custom-icon--${i}`:""].filter(Boolean).join(" ");return(0,c.jsx)(e,{...t,className:o})},"withIconedListItemEditorClasses")),(0,e.registerBlockStyle)("core/buttons",{name:"big-buttons",label:"Grands boutons "}),(0,e.registerBlockVariation)("core/button",{name:"email-button",title:"Bouton email",description:"Ajoute une icone email devant le texte.",attributes:{className:"email-button"},isActive:({className:e=""})=>e.split(/\s+/).includes("email-button"),scope:["inserter","transform","block"]}),(0,e.registerBlockStyle)("core/columns",{name:"sticky-columns",label:"Colonnes sticky"});const a=e=>(e?.className||"").includes("is-style-sticky-columns");(0,r.addFilter)("blocks.getSaveElement","carhop/sticky-columns-wrapper",(e,t,i)=>{if("core/columns"!==t.name||!a(i))return e;if(!e||!e.props||!e.props.children)return e;const o=l.Children.toArray(e.props.children).map((e,t)=>e&&"object"==typeof e&&e.type?(0,l.createElement)("div",{key:`sticky-column-wrapper-${t}`,className:"test"},e):e);return(0,l.cloneElement)(e,{...e.props,children:o})}),(0,r.addFilter)("editor.BlockEdit","carhop/sticky-columns-editor-wrapper",(0,n.createHigherOrderComponent)(e=>t=>{if("core/columns"!==t.name||!a(t.attributes))return(0,c.jsx)(e,{...t});const i=(0,c.jsx)(e,{...t});return i&&i.props&&i.props.children?(0,l.cloneElement)(i,{...i.props,children:(0,l.createElement)("div",{className:"test"},i.props.children)}):i},"withStickyColumnsWrapper")),i(6417)})()})();