(()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var o in l)e.o(l,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:l[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,l=window.wp.blocks,o=window.wp.blockEditor,a=window.wp.components,i=window.wp.serverSideRender;var n=e.n(i);const s=window.wp.i18n,r=JSON.parse('{"UU":"vitalisite-fse/testimonials"}');(0,l.registerBlockType)(r.UU,{edit:function({attributes:e,setAttributes:l}){const{count:i,showRating:c,testimonials_source:g,show_google_header:m,googlePlaceId:u}=e,d=(0,o.useBlockProps)({className:"vitalisite-testimonials-carousel"});return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(o.InspectorControls,null,(0,t.createElement)(a.PanelBody,{title:(0,s.__)("Réglages","vitalisite-fse")},(0,t.createElement)(a.SelectControl,{label:(0,s.__)("Source des témoignages","vitalisite-fse"),value:g,options:[{label:(0,s.__)("Mes témoignages rédigés","vitalisite-fse"),value:"local"},{label:(0,s.__)("Avis Google My Business","vitalisite-fse"),value:"google"}],onChange:e=>l({testimonials_source:e})}),"local"===g&&(0,t.createElement)(a.RangeControl,{label:(0,s.__)("Nombre de témoignages","vitalisite-fse"),value:i,onChange:e=>l({count:e}),min:1,max:12}),(0,t.createElement)(a.ToggleControl,{label:(0,s.__)("Afficher les étoiles","vitalisite-fse"),checked:c,onChange:e=>l({showRating:e})}),"google"===g&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a.ToggleControl,{label:(0,s.__)("Afficher l'en-tête Google","vitalisite-fse"),checked:m,onChange:e=>l({show_google_header:e}),help:(0,s.__)("Logo Google, note globale et boutons CTA","vitalisite-fse")}),(0,t.createElement)(a.TextControl,{label:(0,s.__)("Google Place ID","vitalisite-fse"),value:u,onChange:e=>l({googlePlaceId:e}),placeholder:"ChIJ...",help:(0,t.createElement)(t.Fragment,null,(0,s.__)("Comment trouver votre Google Place ID ? ","vitalisite-fse"),(0,t.createElement)(a.ExternalLink,{href:"https://docs.vitalisite.fr/google-place-id"},(0,s.__)("Documentation Vitalisite","vitalisite-fse")))})))),(0,t.createElement)("div",{...d},(0,t.createElement)(a.Disabled,null,(0,t.createElement)(n(),{block:r.UU,attributes:e}))))},save:()=>null})})();