import{c as re,j as e,d as _,an as qe,z as Ge,ao as le,r as l,ap as Ue,aq as We,G as ne,ar as Ze,as as ke,E as Ye,at as Ke,au as Xe,av as ie,aw as Je,ax as Qe,ay as ea,az as oe,ak as T,a8 as L,a0 as ce,a6 as aa,b as de,O as sa,ab as ue,am as me,y as pe,a4 as xe,aA as $,Z as ta,aB as ra,S as la,a5 as J,a7 as Q,m as na,aC as ia,aD as oa,aE as q,aa as ee,aF as G,a1 as f,ac as v}from"./index-YA7DGzkb.js";import{C as M,a as O,b as I,c as B}from"./card-6IDPHguz.js";import{g as ca,a as da}from"./bookingApi-CCm_8x0I.js";import{P as ua}from"./plane-BbmNtII1.js";import{R as ma}from"./refresh-cw-B0F5LLsW.js";import{F as pa}from"./file-down-4Vo-vhx7.js";import{B as xa}from"./building-2-Dxi8O7Bj.js";/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ga=re("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fa=re("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),va=qe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ha({className:s,variant:a,...r}){return e.jsx("div",{className:_(va({variant:a}),s),...r})}var ge="AlertDialog",[ja,Ha]=Ge(ge,[le]),A=le(),fe=s=>{const{__scopeAlertDialog:a,...r}=s,i=A(a);return e.jsx(Je,{...i,...r,modal:!0})};fe.displayName=ge;var Na="AlertDialogTrigger",ya=l.forwardRef((s,a)=>{const{__scopeAlertDialog:r,...i}=s,d=A(r);return e.jsx(Ue,{...d,...i,ref:a})});ya.displayName=Na;var ba="AlertDialogPortal",ve=s=>{const{__scopeAlertDialog:a,...r}=s,i=A(a);return e.jsx(Qe,{...i,...r})};ve.displayName=ba;var _a="AlertDialogOverlay",he=l.forwardRef((s,a)=>{const{__scopeAlertDialog:r,...i}=s,d=A(r);return e.jsx(We,{...d,...i,ref:a})});he.displayName=_a;var P="AlertDialogContent",[Aa,Ca]=ja(P),Da=ea("AlertDialogContent"),je=l.forwardRef((s,a)=>{const{__scopeAlertDialog:r,children:i,...d}=s,b=A(r),C=l.useRef(null),D=ne(a,C),S=l.useRef(null);return e.jsx(Ze,{contentName:P,titleName:Ne,docsSlug:"alert-dialog",children:e.jsx(Aa,{scope:r,cancelRef:S,children:e.jsxs(ke,{role:"alertdialog",...b,...d,ref:D,onOpenAutoFocus:Ye(d.onOpenAutoFocus,h=>{var u;h.preventDefault(),(u=S.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[e.jsx(Da,{children:i}),e.jsx(wa,{contentRef:C})]})})})});je.displayName=P;var Ne="AlertDialogTitle",ye=l.forwardRef((s,a)=>{const{__scopeAlertDialog:r,...i}=s,d=A(r);return e.jsx(Ke,{...d,...i,ref:a})});ye.displayName=Ne;var be="AlertDialogDescription",_e=l.forwardRef((s,a)=>{const{__scopeAlertDialog:r,...i}=s,d=A(r);return e.jsx(Xe,{...d,...i,ref:a})});_e.displayName=be;var Sa="AlertDialogAction",Ae=l.forwardRef((s,a)=>{const{__scopeAlertDialog:r,...i}=s,d=A(r);return e.jsx(ie,{...d,...i,ref:a})});Ae.displayName=Sa;var Ce="AlertDialogCancel",De=l.forwardRef((s,a)=>{const{__scopeAlertDialog:r,...i}=s,{cancelRef:d}=Ca(Ce,r),b=A(r),C=ne(a,d);return e.jsx(ie,{...b,...i,ref:C})});De.displayName=Ce;var wa=({contentRef:s})=>{const a=`\`${P}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${P}\` by passing a \`${be}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${P}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{var i;document.getElementById((i=s.current)==null?void 0:i.getAttribute("aria-describedby"))||console.warn(a)},[a,s]),null},Ra=fe,Ea=ve,Se=he,we=je,Re=Ae,Ee=De,Pe=ye,ze=_e;const Pa=Ra,za=Ea,Te=l.forwardRef(({className:s,...a},r)=>e.jsx(Se,{className:_("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a,ref:r}));Te.displayName=Se.displayName;const Me=l.forwardRef(({className:s,...a},r)=>e.jsxs(za,{children:[e.jsx(Te,{}),e.jsx(we,{ref:r,className:_("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a})]}));Me.displayName=we.displayName;const Oe=({className:s,...a})=>e.jsx("div",{className:_("flex flex-col space-y-2 text-center sm:text-left",s),...a});Oe.displayName="AlertDialogHeader";const Ve=({className:s,...a})=>e.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...a});Ve.displayName="AlertDialogFooter";const $e=l.forwardRef(({className:s,...a},r)=>e.jsx(Pe,{ref:r,className:_("text-lg font-semibold",s),...a}));$e.displayName=Pe.displayName;const Fe=l.forwardRef(({className:s,...a},r)=>e.jsx(ze,{ref:r,className:_("text-sm text-muted-foreground",s),...a}));Fe.displayName=ze.displayName;const Ie=l.forwardRef(({className:s,...a},r)=>e.jsx(Re,{ref:r,className:_(oe(),s),...a}));Ie.displayName=Re.displayName;const Be=l.forwardRef(({className:s,...a},r)=>e.jsx(Ee,{ref:r,className:_(oe({variant:"outline"}),"mt-2 sm:mt-0",s),...a}));Be.displayName=Ee.displayName;const ae={confirmed:{label:"Confirmée",variant:"default",icon:xe},pending:{label:"En attente",variant:"secondary",icon:pe},cancelled:{label:"Annulée",variant:"destructive",icon:me}};function F(s){if(!s)return"—";try{const a=new Date(s);if(isNaN(a.getTime()))return s;const r=a.toLocaleDateString("fr-FR",{day:"numeric",month:"short",year:"numeric"}),i=String(a.getHours()).padStart(2,"0"),d=String(a.getMinutes()).padStart(2,"0");return`${r} à ${i}h${d}`}catch{return s}}function Ta(s){if(!s)return!1;try{return new Date(s).getTime()-Date.now()>24*60*60*1e3}catch{return!1}}function se(s){return Array.isArray(s)?s.filter(a=>a&&typeof a=="object"&&"title"in a):[]}function Ma(s){const a=s.toUpperCase();return["CONFIRMED","PAID","COMPLETED","SUCCESS","CONFIRM"].includes(a)?"confirmed":["CANCELLED","CANCEL"].includes(a)?"cancelled":"pending"}function te({userId:s,filter:a="all"}){const[r,i]=l.useState([]),[d,b]=l.useState(!0),[C,D]=l.useState(!1),[S,h]=l.useState(null),[u,R]=l.useState(null),w=l.useCallback(t=>{if(a==="all")return t;const m=new Date;return t.filter(p=>{const x=p.arrival_date&&new Date(p.arrival_date)>=m&&p.status!=="cancelled";return a==="upcoming"?x:!x})},[a]),z=l.useCallback(async t=>{const m=t.filter(c=>c.status!=="cancelled");if(m.length===0)return;if(D(!0),(await Promise.allSettled(m.map(async c=>{var j,N;try{const n=await ca(c.order_id),y=Ma(n.booking_status),g={};return y!==c.status&&(g.status=y),n.voucher_url&&n.voucher_url!==c.voucher_url&&(g.voucher_url=n.voucher_url),(j=n.dates)!=null&&j.arrival&&n.dates.arrival!==c.arrival_date&&(g.arrival_date=n.dates.arrival),(N=n.dates)!=null&&N.departure&&n.dates.departure!==c.departure_date&&(g.departure_date=n.dates.departure),n.amount!=null&&n.amount!==Number(c.amount)&&(g.amount=n.amount),Object.keys(g).length>0?(await T.from("bookings").update(g).eq("id",c.id),{id:c.id,updates:g}):null}catch(n){return(n==null?void 0:n.httpStatus)===404||(n==null?void 0:n.code)==="BOOKING_NOT_FOUND"?(console.warn(`[BookingHistory] Booking ${c.order_id} not found on API, deleting locally.`),await T.from("bookings").delete().eq("id",c.id),{id:c.id,deleted:!0}):(console.warn(`[BookingHistory] Sync failed for order ${c.order_id}:`,n),null)}}))).some(c=>c.status==="fulfilled"&&c.value!==null)){const{data:c}=await T.from("bookings").select("*").eq("user_id",s).order("created_at",{ascending:!1});c&&i(w(c))}D(!1)},[s,w]),E=l.useCallback(async()=>{const{data:t,error:m}=await T.from("bookings").select("*").eq("user_id",s).order("created_at",{ascending:!1});!m&&t?(i(w(t)),b(!1),z(t)):b(!1)},[s,w,z]);l.useEffect(()=>{E()},[E]);const V=async t=>{var m;h(t.id),R(null);try{const p=se(t.services).reduce((n,y)=>n+(y.price||0),0),x=(t.amount||0)+p,c=t.status==="confirmed"&&x>0?x:void 0,j=await da(t.order_id,c),{error:N}=await T.from("bookings").update({status:"cancelled"}).eq("id",t.id);N&&console.error("[BookingHistory] DB update failed after API cancel:",N),((m=j.refund)==null?void 0:m.status)==="succeeded"?$({title:"Réservation annulée et remboursée",description:`Votre réservation ${t.booking_id||t.order_id} a été annulée. Un remboursement de ${j.refund.amount.toFixed(2)} € a été effectué et sera crédité sous 5 à 10 jours ouvrés.`}):j.refund===null?$({title:"Réservation annulée",description:`Votre réservation ${t.booking_id||t.order_id} a été annulée.`}):$({title:"Réservation annulée — remboursement en attente",description:"Votre réservation a été annulée mais le remboursement n'a pas pu être traité automatiquement. Veuillez contacter notre support.",variant:"destructive"}),await E()}catch(p){const x=(p==null?void 0:p.message)||"Impossible d'annuler la réservation. Veuillez réessayer.";$({title:"Erreur d'annulation",description:x,variant:"destructive"})}finally{h(null)}};return d?e.jsx(M,{className:"shadow-card border-border/50",children:e.jsx(O,{className:"py-8 flex justify-center",children:e.jsx(L,{className:"animate-spin text-primary",size:24})})}):e.jsxs(e.Fragment,{children:[e.jsxs(M,{className:"shadow-card border-border/50",children:[e.jsx(I,{children:e.jsxs(B,{className:"font-heading text-lg flex items-center gap-2",children:[e.jsx(ce,{size:20,className:"text-primary"}),a==="upcoming"?"Réservations à venir":a==="past"?"Réservations passées":"Mes réservations"]})}),e.jsx(O,{children:r.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(aa,{size:32,className:"mx-auto mb-3 opacity-50"}),e.jsx("p",{className:"text-sm",children:a==="upcoming"?"Aucune réservation à venir.":a==="past"?"Aucune réservation passée.":"Aucune réservation pour le moment."}),e.jsx("p",{className:"text-xs mt-1",children:a==="upcoming"?"Vos prochaines réservations apparaîtront ici.":a==="past"?"Vos anciennes réservations apparaîtront ici.":"Vos futures réservations apparaîtront ici."})]}):e.jsx("div",{className:"space-y-3",children:r.map(t=>{const m=ae[t.status]||ae.pending,p=m.icon,x=t.status!=="cancelled"&&Ta(t.arrival_date),j=t.status!=="cancelled"&&t.arrival_date&&new Date(t.arrival_date)>new Date&&!x,N=S===t.id;return e.jsxs("div",{className:`rounded-xl border overflow-hidden transition-all ${t.status==="cancelled"?"border-destructive/20 bg-destructive/5":t.status==="confirmed"?"border-primary/20 bg-card":"border-border/50 bg-card"}`,children:[e.jsxs("div",{className:`px-4 py-3 flex items-center justify-between ${t.status==="confirmed"?"bg-primary/5 border-b border-primary/10":t.status==="cancelled"?"bg-destructive/5 border-b border-destructive/10":"bg-muted/30 border-b border-border/30"}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ua,{size:14,className:"text-primary"}),e.jsx("span",{className:"font-heading font-semibold text-sm",children:t.parking_name||"Sky Valet Parking"})]}),e.jsxs(ha,{variant:m.variant,className:"text-xs gap-1",children:[e.jsx(p,{size:12}),m.label]})]}),e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-muted/30 rounded-lg px-3 py-2",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground font-medium mb-0.5",children:"Arrivée"}),e.jsx("span",{className:"text-xs font-semibold text-foreground",children:F(t.arrival_date)})]}),e.jsxs("div",{className:"bg-muted/30 rounded-lg px-3 py-2",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground font-medium mb-0.5",children:"Retour"}),e.jsx("span",{className:"text-xs font-semibold text-foreground",children:F(t.departure_date)})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(de,{size:14,className:"text-foreground/60"}),e.jsx("span",{className:"font-medium text-foreground/80",children:t.vehicle_plate||"—"}),t.vehicle_brand&&e.jsxs("span",{children:["• ",t.vehicle_brand]})]}),t.amount!=null&&e.jsxs("span",{className:"font-heading font-bold text-primary text-sm",children:[t.amount.toFixed(2)," ",t.currency||"€"]})]}),(()=>{const n=se(t.services);return n.length===0?null:e.jsxs("div",{className:"bg-primary/5 border border-primary/10 rounded-lg px-3 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx(sa,{size:12,className:"text-primary"}),e.jsxs("span",{className:"text-[10px] uppercase tracking-wider font-semibold text-primary",children:["Services (",n.length,")"]})]}),e.jsx("div",{className:"space-y-1",children:n.map((y,g)=>e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsx("span",{className:"text-foreground/80",children:y.title}),e.jsxs("span",{className:"font-medium text-foreground/70",children:[y.price.toFixed(2)," €"]})]},g))})]})})(),t.status==="cancelled"&&e.jsxs("div",{className:"flex items-center gap-1.5 bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800 rounded-lg px-3 py-2 text-xs text-amber-700 dark:text-amber-400",children:[e.jsx(ma,{size:12,className:"animate-spin flex-shrink-0",style:{animationDuration:"3s"}}),e.jsx("span",{children:"Remboursement en cours — traitement sous 5 à 10 jours ouvrés"})]}),e.jsxs("div",{className:"flex items-center justify-between pt-1 border-t border-border/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[t.booking_id&&e.jsxs("span",{className:"text-[11px] text-muted-foreground font-mono",children:["Réf : ",t.booking_id]}),t.voucher_url&&t.status==="confirmed"&&e.jsxs("a",{href:t.voucher_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:text-primary/80 font-medium transition-colors",children:[e.jsx(pa,{size:12}),"Voucher"]})]}),x&&e.jsxs(ue,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive hover:bg-destructive/10",disabled:N,onClick:()=>R(t),children:[N?e.jsx(L,{className:"animate-spin mr-1",size:12}):e.jsx(me,{size:12,className:"mr-1"}),"Annuler"]}),j&&e.jsxs("span",{className:"text-[11px] text-muted-foreground flex items-center gap-1",children:[e.jsx(pe,{size:11}),"Annulation impossible à moins de 24h"]})]})]})]},t.id)})})})]}),e.jsx(Pa,{open:!!u,onOpenChange:t=>!t&&R(null),children:e.jsxs(Me,{children:[e.jsxs(Oe,{children:[e.jsx($e,{children:"Annuler cette réservation ?"}),e.jsxs(Fe,{children:["Êtes-vous sûr de vouloir annuler votre réservation",u!=null&&u.booking_id?` (Réf : ${u.booking_id})`:""," du"," ",F((u==null?void 0:u.arrival_date)??null)," au"," ",F((u==null?void 0:u.departure_date)??null)," ? Cette action est irréversible."]})]}),e.jsxs(Ve,{children:[e.jsx(Be,{children:"Non, garder"}),e.jsx(Ie,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>u&&V(u),children:"Oui, annuler la réservation"})]})]})})]})}function qa(){const{user:s,profile:a,loading:r,updateProfile:i}=ta(),d=ra(),[b,C]=l.useState(""),[D,S]=l.useState(""),[h,u]=l.useState(""),[R,w]=l.useState(""),[z,E]=l.useState(""),[V,t]=l.useState(""),[m,p]=l.useState(""),[x,c]=l.useState(""),[j,N]=l.useState(""),[n,y]=l.useState(""),[g,U]=l.useState(""),[W,Z]=l.useState(""),[k,Y]=l.useState(!1),[Le,H]=l.useState(!1),[K,X]=l.useState("");l.useEffect(()=>{!r&&!s&&d("/")},[r,s,d]),l.useEffect(()=>{a&&(C(a.first_name??""),S(a.last_name??""),u(a.phone??""),w(a.company_name??""),E(a.billing_address??""),t(a.billing_zipcode??""),p(a.billing_city??""),c(a.billing_vat??""),N(a.preferred_vehicle_brand??""),y(a.preferred_vehicle_model??""),U(a.preferred_vehicle_color??""),Z(a.preferred_plate??""))},[a]);const He=async()=>{Y(!0),X(""),H(!1);const{error:o}=await i({first_name:b,last_name:D,phone:h,company_name:R||null,billing_address:z||null,billing_zipcode:V||null,billing_city:m||null,billing_vat:x||null,preferred_vehicle_brand:j||null,preferred_vehicle_model:n||null,preferred_vehicle_color:g||null,preferred_plate:W||null});o?X(o.message??"Erreur lors de la sauvegarde"):H(!0),Y(!1),o||setTimeout(()=>H(!1),3e3)};return r?e.jsx("section",{className:"py-20 flex justify-center",children:e.jsx(L,{className:"animate-spin text-primary",size:32})}):e.jsx("section",{className:"py-12 md:py-20",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-2xl",children:[e.jsx(la,{title:"Mon espace client",subtitle:"Gérez vos informations et réservations"}),K&&e.jsx(J,{variant:"destructive",className:"mb-6",children:e.jsx(Q,{children:K})}),Le&&e.jsxs(J,{className:"mb-6",children:[e.jsx(xe,{className:"h-4 w-4 text-green-500"}),e.jsx(Q,{children:"Informations sauvegardées avec succès."})]}),e.jsx(na.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:e.jsxs(ia,{defaultValue:"info",className:"w-full",children:[e.jsxs(oa,{className:"w-full grid grid-cols-3 mb-6",children:[e.jsxs(q,{value:"info",className:"text-xs sm:text-sm gap-1.5",children:[e.jsx(ee,{size:14,className:"hidden sm:inline"}),"Infos & Préférences"]}),e.jsxs(q,{value:"upcoming",className:"text-xs sm:text-sm gap-1.5",children:[e.jsx(ce,{size:14,className:"hidden sm:inline"}),"À venir"]}),e.jsxs(q,{value:"past",className:"text-xs sm:text-sm gap-1.5",children:[e.jsx(ga,{size:14,className:"hidden sm:inline"}),"Passées"]})]}),e.jsxs(G,{value:"info",className:"space-y-6",children:[e.jsxs(M,{className:"shadow-card border-border/50",children:[e.jsx(I,{children:e.jsxs(B,{className:"font-heading text-lg flex items-center gap-2",children:[e.jsx(ee,{size:20,className:"text-primary"})," Mes informations"]})}),e.jsxs(O,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Prénom"}),e.jsx(v,{value:b,onChange:o=>C(o.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Nom"}),e.jsx(v,{value:D,onChange:o=>S(o.target.value)})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Email"}),e.jsx(v,{value:(s==null?void 0:s.email)??"",disabled:!0,className:"opacity-60"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Téléphone"}),e.jsx(v,{value:h,onChange:o=>u(o.target.value),placeholder:"+33 6 12 34 56 78"})]})]})]})]}),e.jsxs(M,{className:"shadow-card border-border/50",children:[e.jsx(I,{children:e.jsxs(B,{className:"font-heading text-lg flex items-center gap-2",children:[e.jsx(xa,{size:20,className:"text-primary"})," Facturation entreprise"]})}),e.jsxs(O,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Société"}),e.jsx(v,{value:R,onChange:o=>w(o.target.value),placeholder:"Ma Société SAS"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"N° TVA"}),e.jsx(v,{value:x,onChange:o=>c(o.target.value),placeholder:"FR12345678901"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Adresse"}),e.jsx(v,{value:z,onChange:o=>E(o.target.value),placeholder:"12 rue de la Paix"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Code postal"}),e.jsx(v,{value:V,onChange:o=>t(o.target.value),placeholder:"75001"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Ville"}),e.jsx(v,{value:m,onChange:o=>p(o.target.value),placeholder:"Paris"})]})]})]})]}),e.jsxs(M,{className:"shadow-card border-border/50",children:[e.jsx(I,{children:e.jsxs(B,{className:"font-heading text-lg flex items-center gap-2",children:[e.jsx(de,{size:20,className:"text-primary"})," Mon véhicule"]})}),e.jsxs(O,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Marque"}),e.jsx(v,{value:j,onChange:o=>N(o.target.value),placeholder:"Peugeot"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Modèle"}),e.jsx(v,{value:n,onChange:o=>y(o.target.value),placeholder:"308"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Couleur"}),e.jsx(v,{value:g,onChange:o=>U(o.target.value),placeholder:"Grise"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(f,{children:"Plaque d'immatriculation"}),e.jsx(v,{value:W,onChange:o=>Z(o.target.value.toUpperCase()),placeholder:"AB-123-CD"})]})]})]})]}),e.jsxs(ue,{onClick:He,disabled:k,className:"w-full h-12 text-base",children:[k?e.jsx(L,{className:"animate-spin mr-2",size:18}):e.jsx(fa,{className:"mr-2",size:18}),"Sauvegarder mes informations"]})]}),e.jsx(G,{value:"upcoming",children:s&&e.jsx(te,{userId:s.id,filter:"upcoming"})}),e.jsx(G,{value:"past",children:s&&e.jsx(te,{userId:s.id,filter:"past"})})]})})]})})}export{qa as default};