(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,77071,e=>{"use strict";let l=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,l],77071)},95187,(e,l,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={callServer:function(){return n.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var t in i)Object.defineProperty(r,t,{enumerable:!0,get:i[t]});let n=e.r(32120),a=e.r(92245),s=e.r(35326)},55281,e=>{"use strict";var l=e.i(43476),r=e.i(71645),i=e.i(77071),t=e.i(38286),n=e.i(19367),a=e.i(95187);let s=(0,a.createServerReference)("40d73376dac54d57db943f0c572163db6b69d41e2e",a.callServer,void 0,a.findSourceMapURL,"createCoachingSession"),d=(0,a.createServerReference)("40a45ed048e9edc240ca8196a81e57aa179cd2b3b3",a.callServer,void 0,a.findSourceMapURL,"createTraining");e.s(["NewCoachingButton",0,function({creators:e,coaches:a}){let[d,c]=(0,r.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(t.Button,{onClick:()=>c(!0),children:[(0,l.jsx)(i.Plus,{className:"h-4 w-4"})," Nouvelle session"]}),(0,l.jsx)(n.Modal,{open:d,onClose:()=>c(!1),title:"Nouvelle session de coaching",wide:!0,children:(0,l.jsxs)("form",{action:s,className:"space-y-4",children:[(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(t.Field,{label:"Créateur",required:!0,children:(0,l.jsxs)(t.Select,{name:"creatorId",defaultValue:"",required:!0,children:[(0,l.jsx)("option",{value:"",children:"— Choisir —"}),e.map(e=>(0,l.jsx)("option",{value:e.id,children:e.label},e.id))]})}),(0,l.jsx)(t.Field,{label:"Coach",children:(0,l.jsxs)(t.Select,{name:"coachId",defaultValue:"",children:[(0,l.jsx)("option",{value:"",children:"— Choisir —"}),a.map(e=>(0,l.jsx)("option",{value:e.id,children:e.label},e.id))]})}),(0,l.jsx)(t.Field,{label:"Date",required:!0,children:(0,l.jsx)(t.Input,{name:"date",type:"date",defaultValue:new Date().toISOString().slice(0,10)})}),(0,l.jsx)(t.Field,{label:"Prochain objectif",children:(0,l.jsx)(t.Input,{name:"nextObjective",placeholder:"Ex : 20 h de LIVE ce mois"})})]}),(0,l.jsx)(t.Field,{label:"Compte rendu",children:(0,l.jsx)(t.Textarea,{name:"report"})}),(0,l.jsx)(t.Field,{label:"Recommandations",children:(0,l.jsx)(t.Textarea,{name:"recommendations"})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 border-t border-ink-700 pt-4",children:[(0,l.jsx)(t.Button,{type:"button",variant:"ghost",onClick:()=>c(!1),children:"Annuler"}),(0,l.jsx)(t.Button,{type:"submit",children:"Enregistrer"})]})]})})]})},"NewTrainingButton",0,function({creators:e}){let[a,s]=(0,r.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(t.Button,{onClick:()=>s(!0),children:[(0,l.jsx)(i.Plus,{className:"h-4 w-4"})," Nouvelle formation"]}),(0,l.jsx)(n.Modal,{open:a,onClose:()=>s(!1),title:"Nouvelle formation",children:(0,l.jsxs)("form",{action:d,className:"space-y-4",children:[(0,l.jsx)(t.Field,{label:"Intitulé",required:!0,children:(0,l.jsx)(t.Input,{name:"title",placeholder:"Ex : Maîtriser les battles",required:!0})}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(t.Field,{label:"Créateur",children:(0,l.jsxs)(t.Select,{name:"creatorId",defaultValue:"",children:[(0,l.jsx)("option",{value:"",children:"— Tous (collectif) —"}),e.map(e=>(0,l.jsx)("option",{value:e.id,children:e.label},e.id))]})}),(0,l.jsx)(t.Field,{label:"Date",children:(0,l.jsx)(t.Input,{name:"date",type:"date"})})]}),(0,l.jsx)(t.Field,{label:"Notes",children:(0,l.jsx)(t.Textarea,{name:"notes"})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 border-t border-ink-700 pt-4",children:[(0,l.jsx)(t.Button,{type:"button",variant:"ghost",onClick:()=>s(!1),children:"Annuler"}),(0,l.jsx)(t.Button,{type:"submit",children:"Créer"})]})]})})]})}],55281)}]);