import{r as x,j as e}from"./index-DVgsXMJe.js";import{m as l}from"./proxy-BdznxAXt.js";function d({commands:n,onSend:a,readOnly:s=!1,className:o=""}){const[i,r]=x.useState(""),c=t=>{t.preventDefault(),i.trim()&&(s||(a(i.trim()),r("")))};return e.jsxs(l.section,{className:`hud-panel rounded-2xl p-4 ${o}`,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"font-display text-base text-neon-cyan",children:"Command Console"}),e.jsx("span",{className:"text-xs uppercase tracking-[0.3em] text-neon-cyan/60",children:"Text"})]}),e.jsxs("form",{onSubmit:c,className:"mt-3 flex gap-2",children:[e.jsx("input",{value:i,onChange:t=>r(t.target.value),placeholder:s?"Mode lecture seule":"Décris ta mission…",disabled:s,className:"holo-input flex-1 rounded-xl px-3 py-2 text-sm text-white outline-none focus:border-neon-cyan/50 disabled:cursor-not-allowed disabled:opacity-60"}),e.jsx("button",{type:"submit",disabled:s,className:"rounded-xl border border-neon-cyan/40 bg-neon-cyan/10 px-4 text-xs uppercase tracking-[0.3em] text-neon-cyan hover:bg-neon-cyan/20 disabled:cursor-not-allowed disabled:opacity-60",children:s?"Viewer":"Envoyer"})]}),e.jsxs("div",{className:"mt-3 space-y-3",children:[n.length===0?e.jsx("p",{className:"text-sm text-muted",children:"Aucune commande pour le moment."}):n.slice(0,3).map(t=>e.jsxs("div",{className:"rounded-xl border border-neon-cyan/15 bg-bg-800/60 p-3",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-[0.3em] text-neon-cyan/50",children:t.ts}),e.jsx("p",{className:"mt-1 text-xs text-white",children:t.text}),t.response&&e.jsx("p",{className:"mt-2 text-xs text-neon-cyan/80",children:t.response})]},t.id)),n.length>3&&e.jsxs("p",{className:"text-xs text-muted",children:["… ",n.length-3," commandes masquées"]})]})]})}function u({commands:n,onSend:a,readOnly:s=!1,className:o=""}){return e.jsxs(l.div,{className:"relative",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:[e.jsx("div",{className:"absolute -top-6 left-8 text-xs uppercase tracking-[0.3em] text-neon-cyan/70",children:"Command Layer"}),e.jsx(d,{commands:n,onSend:a,readOnly:s,className:o})]})}export{u as HoloCommandLayer};
