2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
|
import{r as p,j as e,ap as y,V as w,i as h,R as C,U as b,T as m,a as o,aq as k,Q as A,D as V,q as u}from"./0-vendor-react-DWOJpYrt.js";import{B as P}from"./page-galeriaimagenes-Dnb019dP.js";import{u as E,g as O,P as I,N as R,i as S}from"./page-rcp-CZ8w6Oz0.js";import{u as M}from"./page-farmacos-BsW3CLyQ.js";import"./1-vendor-utils-Delnuc0l.js";import"./2-vendor-markdown-BQlHAcA7.js";import"./page-ajustes-DgawOEJM.js";import"./page-comunicacion-DmHQUHoW.js";const g=["Valoración inicial (leve/grave)","Obstrucción leve: animar a toser","Obstrucción grave: 5 golpes interescapulares","5 compresiones abdominales (Heimlich)","Alternar golpes + compresiones","Si pierde consciencia: activar 112","Revisar boca antes de ventilar","Extraer objeto visible si se ve","Iniciar RCP si pierde consciencia","Derivar tras maniobras"],G=()=>{const[l,j]=p.useState(!1),[n,c]=p.useState(new Set),{protocol:f,isExternal:N}=M("obstruccion-via-aerea"),a=f,d=E("obstruccion-via-aerea"),v=O("obstruccion-via-aerea");if(d.status==="loading")return e.jsx(I,{});if(d.status==="error")return e.jsx(R,{message:"Error al cargar relaciones del protocolo de Vía Aérea",backTo:"/"});const r=S(d)?d.data:null;return e.jsxs("div",{className:"space-y-6",children:[e.jsx(P,{to:"/",label:"Volver al inicio"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-red-500/20 flex items-center justify-center",children:e.jsx(y,{className:"w-7 h-7 text-red-500"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Vía Aérea"}),N&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs bg-blue-500/10 text-blue-500 border border-blue-500/20 rounded-md",children:[e.jsx(w,{className:"w-3 h-3"}),"Externo"]})]}),e.jsx("p",{className:"text-muted-foreground",children:"OVACE (Obstrucción de Vía Aérea por Cuerpo Extraño) e IOT"})]})]}),e.jsxs("button",{onClick:()=>{j(!l),l||c(new Set)},className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg font-medium transition-colors ${l?"bg-green-500/20 text-green-600 dark:text-green-400 border-2 border-green-500/50":"bg-muted hover:bg-accent text-foreground border border-border"}`,children:[e.jsx("span",{className:"text-lg",children:"🟢"}),e.jsx("span",{children:l?"Modo Checklist Activo":"Modo Checklist"})]})]}),l&&e.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"text-xl font-semibold text-foreground flex items-center gap-2",children:[e.jsx(h,{className:"w-5 h-5 text-green-500"}),"Checklist OVACE - Marca los pasos completados"]}),n.size>0&&e.jsxs("button",{onClick:()=>c(new Set),className:"flex items-center gap-2 px-3 py-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(C,{className:"w-4 h-4"}),"Reiniciar"]})]}),e.jsx("div",{className:"space-y-2",children:g.map((t,s)=>{const i=n.has(s);return e.jsxs("button",{onClick:()=>{const x=new Set(n);i?x.delete(s):x.add(s),c(x)},className:`w-full flex items-center gap-4 p-4 rounded-lg border-2 transition-all text-left ${i?"bg-green-500/10 border-green-500/50":"bg-muted border-border hover:border-primary/50"}`,children:[e.jsx("div",{className:`w-12 h-12 rounded-lg border-2 flex items-center justify-center flex-shrink-0 transition-colors ${i?"bg-green-500 border-green-500":"bg-card border-muted-foreground"}`,children:i?e.jsx(h,{className:"w-6 h-6 text-white"}):e.jsx("span",{className:"text-muted-foreground font-bold text-lg",children:s+1})}),e.jsx("span",{className:`flex-1 font-medium ${i?"text-foreground line-through opacity-60":"text-foreground"}`,children:t})]},s)})}),e.jsx("div",{className:"mt-4 p-3 bg-muted/50 rounded-lg text-center",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[n.size," de ",g.length," pasos completados"]})})]}),
|