module.exports=[3512,a=>{"use strict";let b=(0,a.i(64831).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);a.s(["Plus",0,b],3512)},5050,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={callServer:function(){return f.callServer},createServerReference:function(){return h.createServerReference},findSourceMapURL:function(){return g.findSourceMapURL}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20611),g=a.r(1722),h=a.r(38783)},96625,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(3512),e=a.i(58918),f=a.i(91645),g=a.i(5050);let h=(0,g.createServerReference)("40e71ca6e6399c1ea60c37cb120dc711e0cd2a41f8",g.callServer,void 0,g.findSourceMapURL,"createAutomation"),i=(0,g.createServerReference)("400da584ef99050d50d6f1eda119ef64f2a5c2593c",g.callServer,void 0,g.findSourceMapURL,"createTemplate");a.s(["NewAutomationButton",0,function(){let[a,g]=(0,c.useState)(!1);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(e.Button,{onClick:()=>g(!0),children:[(0,b.jsx)(d.Plus,{className:"h-4 w-4"})," Nouvelle automatisation"]}),(0,b.jsx)(f.Modal,{open:a,onClose:()=>g(!1),title:"Nouvelle automatisation",wide:!0,children:(0,b.jsxs)("form",{action:h,className:"space-y-4",children:[(0,b.jsx)(e.Field,{label:"Nom",required:!0,children:(0,b.jsx)(e.Input,{name:"name",placeholder:"Ex : Relance livrable manquant",required:!0})}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsx)(e.Field,{label:"Déclencheur",children:(0,b.jsxs)(e.Select,{name:"trigger",defaultValue:"LIVRABLE_NON_DEPOSE",children:[(0,b.jsx)("option",{value:"CONTRAT_ECHEANCE",children:"Contrat arrivant à échéance"}),(0,b.jsx)("option",{value:"LIVRABLE_NON_DEPOSE",children:"Livrable non déposé avant la date limite"}),(0,b.jsx)("option",{value:"INACTIVITE_LIVE",children:"Inactivité LIVE prolongée"}),(0,b.jsx)("option",{value:"CAMPAGNE_PUBLIEE",children:"Campagne passée au statut « Publié »"}),(0,b.jsx)("option",{value:"STATS_COMPLETES",children:"Statistiques toutes renseignées"}),(0,b.jsx)("option",{value:"IMPAYE_SEUIL",children:"Impayé dépassant un seuil"})]})}),(0,b.jsx)(e.Field,{label:"Action",children:(0,b.jsxs)(e.Select,{name:"action",defaultValue:"CREER_TACHE",children:[(0,b.jsx)("option",{value:"CREER_TACHE",children:"Créer une tâche"}),(0,b.jsx)("option",{value:"NOTIFIER",children:"Notifier"}),(0,b.jsx)("option",{value:"GENERER_FACTURE",children:"Préparer une facture"}),(0,b.jsx)("option",{value:"GENERER_RAPPORT",children:"Générer un rapport PDF"}),(0,b.jsx)("option",{value:"ALERTER",children:"Alerter la direction"})]})})]}),(0,b.jsx)(e.Field,{label:"Configuration (JSON)",hint:"Paramètres avancés du déclencheur",children:(0,b.jsx)(e.Textarea,{name:"config",placeholder:'{ "seuil": 1000, "delaiJours": 3 }'})}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 border-t border-ink-700 pt-4",children:[(0,b.jsx)(e.Button,{type:"button",variant:"ghost",onClick:()=>g(!1),children:"Annuler"}),(0,b.jsx)(e.Button,{type:"submit",children:"Créer"})]})]})})]})},"NewTemplateButton",0,function(){let[a,g]=(0,c.useState)(!1);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(e.Button,{onClick:()=>g(!0),children:[(0,b.jsx)(d.Plus,{className:"h-4 w-4"})," Nouveau modèle"]}),(0,b.jsx)(f.Modal,{open:a,onClose:()=>g(!1),title:"Nouveau modèle",wide:!0,children:(0,b.jsxs)("form",{action:i,className:"space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsx)(e.Field,{label:"Nom",required:!0,children:(0,b.jsx)(e.Input,{name:"name",required:!0})}),(0,b.jsx)(e.Field,{label:"Type",children:(0,b.jsxs)(e.Select,{name:"type",defaultValue:"CONTRAT",children:[(0,b.jsx)("option",{value:"CONTRAT",children:"Contrat"}),(0,b.jsx)("option",{value:"BRIEF",children:"Brief"}),(0,b.jsx)("option",{value:"RAPPORT",children:"Rapport"}),(0,b.jsx)("option",{value:"FACTURE",children:"Facture"}),(0,b.jsx)("option",{value:"MAIL",children:"Email"})]})})]}),(0,b.jsx)(e.Field,{label:"Variables (séparées par des virgules)",children:(0,b.jsx)(e.Input,{name:"variables",placeholder:"{{nom}}, {{pseudo}}"})}),(0,b.jsx)(e.Field,{label:"Contenu",required:!0,children:(0,b.jsx)(e.Textarea,{name:"content",className:"min-h-40 font-mono text-xs",required:!0})}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 border-t border-ink-700 pt-4",children:[(0,b.jsx)(e.Button,{type:"button",variant:"ghost",onClick:()=>g(!1),children:"Annuler"}),(0,b.jsx)(e.Button,{type:"submit",children:"Créer"})]})]})})]})}],96625)}];

//# sourceMappingURL=_130x9x4._.js.map