function Confirmation({go,lastOrder}){
const {Breadcrumbs,Card,Button,Badge} = window.IDHDesignSystem_6f4674;
function Icon({name,size=44}){const pascal=name.replace(/(^\w|-\w)/g,c=>c.replace('-','').toUpperCase());const nodes=window.lucide&&window.lucide.icons[pascal];const inner=nodes?nodes.map(([tag,attrs])=>'<'+tag+' '+Object.entries(attrs).map(([k,v])=>k+'="'+v+'"').join(' ')+'/>').join(''):'';const svg='<svg xmlns="http://www.w3.org/2000/svg" width="'+size+'" height="'+size+'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+inner+'</svg>';return React.createElement('span',{style:{display:'inline-flex',width:size,height:size,color:'var(--status-success-fg)'},dangerouslySetInnerHTML:{__html:svg}});}

if(!lastOrder){
return React.createElement('div',{style:{maxWidth:1240,margin:'0 auto',padding:'32px 32px 80px'}},
React.createElement(Card,{padding:'48px'},React.createElement('div',{style:{textAlign:'center',color:'var(--text-muted)',fontFamily:'var(--font-body)'}},'Aucune commande récente à afficher.',React.createElement('div',{style:{marginTop:16}},React.createElement(Button,{variant:'primary',onClick:()=>go('accueil')},'Retour à l’accueil')))));
}

return React.createElement('div',{style:{maxWidth:760,margin:'0 auto',padding:'56px 32px 80px'}},
React.createElement(Card,{padding:'40px',elevated:true},
React.createElement('div',{style:{textAlign:'center'}},
React.createElement(Icon,{name:'check-circle-2'}),
React.createElement('div',{style:{fontFamily:'var(--font-display)',fontWeight:800,fontSize:26,color:'var(--text-primary)',marginTop:16}},'Commande confirmée'),
React.createElement('div',{style:{fontFamily:'var(--font-body)',fontSize:15,color:'var(--text-secondary)',marginTop:8}},'Référence ',React.createElement('strong',null,lastOrder.reference)),
lastOrder.statusLabel&&React.createElement('div',{style:{marginTop:10}},React.createElement(Badge,{tone:'success'},lastOrder.statusLabel)),
React.createElement('div',{style:{fontFamily:'var(--font-body)',fontSize:14,color:'var(--text-muted)',marginTop:10}},
lastOrder.emailSent?'Un e-mail de confirmation vous a été envoyé. ':'',
'Notre équipe vous contactera pour la confirmer. Gardez votre numéro de commande et votre téléphone pour suivre son avancement.')),
React.createElement('div',{style:{borderTop:'1px solid var(--border-default)',marginTop:28,paddingTop:24,display:'grid',gridTemplateColumns:'1fr 1fr',gap:20}},
React.createElement('div',null,
React.createElement('div',{style:{fontFamily:'var(--font-body)',fontSize:12,fontWeight:700,color:'var(--text-muted)',textTransform:'uppercase',letterSpacing:'var(--tracking-wide)',marginBottom:6}},'Livraison'),
React.createElement('div',{style:{fontFamily:'var(--font-body)',fontSize:14.5,color:'var(--text-primary)',lineHeight:1.7}},lastOrder.name,React.createElement('br'),lastOrder.phone,React.createElement('br'),lastOrder.address,', ',lastOrder.commune)),
React.createElement('div',null,
React.createElement('div',{style:{fontFamily:'var(--font-body)',fontSize:12,fontWeight:700,color:'var(--text-muted)',textTransform:'uppercase',letterSpacing:'var(--tracking-wide)',marginBottom:6}},'Paiement'),
React.createElement('div',{style:{fontFamily:'var(--font-body)',fontSize:14.5,color:'var(--text-primary)',lineHeight:1.7}},lastOrder.methodLabel,React.createElement('br'),React.createElement('span',{style:{fontFamily:'var(--font-display)',fontWeight:700,color:'var(--brand-primary)'}},lastOrder.total.toLocaleString('fr-FR'),' FCFA')))),
React.createElement('div',{style:{marginTop:28,paddingTop:20,borderTop:'1px solid var(--border-default)'}},
React.createElement('div',{style:{fontFamily:'var(--font-body)',fontSize:13.5,color:'var(--text-muted)',marginBottom:8}},'Articles commandés'),
lastOrder.cart.map(it=>React.createElement('div',{key:it.ref,style:{display:'flex',justifyContent:'space-between',fontFamily:'var(--font-body)',fontSize:13.5,color:'var(--text-secondary)',marginBottom:6}},React.createElement('span',null,it.qty,'× ',it.name),React.createElement('span',null,(it.price*it.qty).toLocaleString('fr-FR'),' FCFA')))),
React.createElement('div',{style:{marginTop:24}},React.createElement(Button,{variant:'secondary',fullWidth:true,onClick:()=>go('suivi')},'Suivre ma commande')),
React.createElement('div',{style:{display:'flex',gap:12,marginTop:12}},
React.createElement(Button,{variant:'secondary',fullWidth:true,onClick:()=>go('accueil')},'Retour à l’accueil'),
React.createElement(Button,{variant:'primary',fullWidth:true,onClick:()=>go('catalogue')},'Continuer mes achats'))));
}
window.Confirmation = Confirmation;
