import{dq as c,dG as l,dm as t}from"./index-D_pphaE2.js";const u=c.memo(n=>{const{value:s,name:r}=n,{t:a}=l("values");switch(r){case"contact":return a(s?e=>e.closed:e=>e.open);case"occupancy":case"area1Occupancy":case"area2Occupancy":case"area3Occupancy":case"area4Occupancy":return a(s?e=>e.occupied:e=>e.clear);case"water_leak":return s?t.jsx("span",{className:"text-error animate-pulse",children:a(e=>e.leaking)}):a(e=>e.clear);case"carbon_monoxide":return s?t.jsx("span",{className:"text-error animate-pulse",children:a(e=>e.alarm)}):a(e=>e.normal);case"tamper":return s?t.jsx("span",{className:"text-error animate-pulse",children:a(e=>e.tampered)}):a(e=>e.clear);case"end_of_life":case"fault":return s?t.jsx("span",{className:"text-error animate-pulse",children:a(e=>e.true)}):a(e=>e.false);case"testing":case"warming_up":return s?t.jsx("span",{className:"text-warning animate-pulse",children:a(e=>e.in_progress)}):a(e=>e.done);case"supported":return a(s?e=>e.supported:e=>e.not_supported);default:return a(s?e=>e.true:e=>e.false)}}),i=c.memo(n=>{const{t:s}=l("values"),{value:r}=n;switch(typeof r){case"boolean":return t.jsx(u,{...n});case"undefined":return"N/A";case"object":return r===null?s(a=>a.null):JSON.stringify(r);case"string":return r===""?t.jsx("span",{className:"text-xs opacity-50",children:s(a=>a.empty_string)}):r;default:return JSON.stringify(r)}});export{i as D};
