(()=>{"use strict";var e,r={2841:()=>{const e=window.wp.blocks,r=(window.wp.i18n,window.wp.blockEditor),t=window.wp.components,n=window.React;var o,l;function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.apply(null,arguments)}var s,a,c=function(e){return n.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32"},e),o||(o=n.createElement("g",{fill:"none",stroke:"currentColor",strokeWidth:2},n.createElement("path",{d:"m21.15 10.59-9.38 10.02M21.15 21.4V10.59H10.83"}))),l||(l=n.createElement("circle",{cx:16,cy:16,r:15,fill:"none",stroke:"currentColor",strokeWidth:2})))};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},h.apply(null,arguments)}var u=function(e){return n.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32"},e),s||(s=n.createElement("circle",{cx:16,cy:16,r:15,fill:"none",stroke:"currentColor",strokeWidth:2})),a||(a=n.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 9v11m-5-3 5 6 5-6"})))};const d=window.ReactJSXRuntime,p=JSON.parse('{"UU":"carhop-blocks/cta"}');(0,e.registerBlockType)(p.UU,{icon:{src:(0,d.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",children:[(0,d.jsxs)("g",{children:[(0,d.jsx)("path",{d:"M21.15,10.59l-9.38,10.02",stroke:"#136f63",fill:"none",strokeWidth:"3"}),(0,d.jsx)("path",{d:"M21.15,21.4v-10.81h-10.32",stroke:"#136f63",fill:"none",strokeWidth:"3"})]}),(0,d.jsx)("circle",{cx:"16",cy:"16",r:"15",stroke:"#136f63",fill:"none",strokeWidth:"3"})]})},edit:function({attributes:e,setAttributes:n}){const{color:o,link:l}=e,i=(0,r.useSetting)("color.palette.theme"),s="string"==typeof l?.url&&l.url.startsWith("#");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.BlockControls,{children:(0,d.jsx)(r.AlignmentToolbar,{value:e.align,onChange:e=>n({align:e})})}),(0,d.jsx)(r.InspectorControls,{children:(0,d.jsxs)(t.PanelBody,{title:"Lien",initialOpen:!0,children:[(0,d.jsx)("div",{children:(0,d.jsx)(r.__experimentalLinkControl,{value:e.link,label:"Lien",onSelect:e=>{},onChange:e=>{var r;(r=e)?(r.url&&(r.title=r.url),n({link:r})):n({link:void 0})}},"link-control")}),(0,d.jsx)(t.PanelBody,{title:"Couleur",initialOpen:!0,children:(0,d.jsx)(t.PanelRow,{children:(0,d.jsx)(t.ColorPalette,{value:o,onChange:e=>{!function(e){n({color:e})}(e)},colors:i,disableCustomColors:!0})})})]})}),(0,d.jsxs)("div",{...(0,r.useBlockProps)({className:`cta align--${e.align}${s?" cta--hash-link":""}`,style:{"--cta-current-color":o}}),children:[(0,d.jsx)(r.RichText,{tagName:"a",placeholder:"Ajouter un lien",value:e.text,onChange:e=>n({text:e}),allowedFormats:[]}),s?(0,d.jsx)(u,{style:{color:o}}):(0,d.jsx)(c,{style:{color:o}})]})]})},save:function({attributes:e}){}})}},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var l=t[e]={exports:{}};return r[e](l,l.exports,n),l.exports}n.m=r,e=[],n.O=(r,t,o,l)=>{if(!t){var i=1/0;for(h=0;h<e.length;h++){for(var[t,o,l]=e[h],s=!0,a=0;a<t.length;a++)(!1&l||i>=l)&&Object.keys(n.O).every(e=>n.O[e](t[a]))?t.splice(a--,1):(s=!1,l<i&&(i=l));if(s){e.splice(h--,1);var c=o();void 0!==c&&(r=c)}}return r}l=l||0;for(var h=e.length;h>0&&e[h-1][2]>l;h--)e[h]=e[h-1];e[h]=[t,o,l]},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={7010:0,3350:0};n.O.j=r=>0===e[r];var r=(r,t)=>{var o,l,[i,s,a]=t,c=0;if(i.some(r=>0!==e[r])){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(a)var h=a(n)}for(r&&r(t);c<i.length;c++)l=i[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(h)},t=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var o=n.O(void 0,[3350],()=>n(2841));o=n.O(o)})();