1 line
4.3 KiB
JavaScript
1 line
4.3 KiB
JavaScript
import{i as e,r as t,t as n}from"./dist-aE7UmubC.js";import{O as r}from"./index-CJ1jXWsM.js";var i=t(),a=e(),o={ok:{block:`bg-gruen/[0.07] ring-gruen/30`,glut:`var(--gruen)`,text:`text-gruen`},info:{block:`bg-cyan/[0.07] ring-cyan/30`,glut:`var(--cyan)`,text:`text-cyan-text`},gelb:{block:`bg-bernstein/[0.08] ring-bernstein/35`,glut:`var(--bernstein)`,text:`text-bernstein`},rot:{block:`bg-rot/10 ring-rot/40`,glut:`var(--rot)`,text:`text-rot-text`},stumm:{block:`bg-white/[0.04] ring-white/15`,glut:`var(--text-3)`,text:`text-text-2`}};function s(e){let t=(0,i.c)(32),{art:r,oben:s,mitte:c,unten:l,aktiv:u,onAnsehen:d,label:f,children:p}=e,m=o[r],h=`radial-gradient(closest-side, color-mix(in srgb, ${m.glut} 20%, transparent), transparent)`,g;t[0]===h?g=t[1]:(g=(0,a.jsx)(`div`,{"aria-hidden":!0,className:`glut-atmet pointer-events-none absolute -top-40 -left-32 size-[460px] rounded-full`,style:{background:h}}),t[0]=h,t[1]=g);let _=!u,v=`${s}: ${c}`,y=u?`cursor-pointer hover:brightness-125`:`cursor-default`,b=r===`gelb`&&`lampe-atmet`,x;t[2]!==m.block||t[3]!==y||t[4]!==b?(x=n(`flex min-h-[132px] flex-col items-start justify-center gap-1.5 rounded-2xl px-5 py-4 text-left ring-1 ring-inset transition-[filter]`,m.block,y,b),t[2]=m.block,t[3]=y,t[4]=b,t[5]=x):x=t[5];let S;t[6]===s?S=t[7]:(S=(0,a.jsx)(`span`,{className:`etikett text-[11px] tracking-[0.18em] text-text-3`,children:s}),t[6]=s,t[7]=S);let C;t[8]===m.text?C=t[9]:(C=n(`text-[30px] leading-tight font-semibold tracking-[-0.01em] sm:text-[34px]`,m.text),t[8]=m.text,t[9]=C);let w;t[10]!==c||t[11]!==C?(w=(0,a.jsx)(`span`,{className:C,children:c}),t[10]=c,t[11]=C,t[12]=w):w=t[12];let T;t[13]===l?T=t[14]:(T=(0,a.jsx)(`span`,{className:`text-[13.5px] text-text-2`,children:l}),t[13]=l,t[14]=T);let E;t[15]!==d||t[16]!==w||t[17]!==T||t[18]!==_||t[19]!==v||t[20]!==x||t[21]!==S?(E=(0,a.jsxs)(`button`,{type:`button`,onClick:d,disabled:_,"aria-label":v,className:x,children:[S,w,T]}),t[15]=d,t[16]=w,t[17]=T,t[18]=_,t[19]=v,t[20]=x,t[21]=S,t[22]=E):E=t[22];let D;t[23]===p?D=t[24]:(D=(0,a.jsx)(`ul`,{className:`m-0 grid list-none grid-cols-1 gap-2 p-0 min-[480px]:grid-cols-2 xl:grid-cols-4`,children:p}),t[23]=p,t[24]=D);let O;t[25]!==E||t[26]!==D?(O=(0,a.jsxs)(`div`,{className:`relative grid gap-4 p-4 sm:p-5 lg:grid-cols-[280px_minmax(0,1fr)] lg:gap-5`,children:[E,D]}),t[25]=E,t[26]=D,t[27]=O):O=t[27];let k;return t[28]!==f||t[29]!==O||t[30]!==g?(k=(0,a.jsxs)(`section`,{"aria-label":f,className:`auftauchen flaeche relative overflow-hidden rounded-3xl`,children:[g,O]}),t[28]=f,t[29]=O,t[30]=g,t[31]=k):k=t[31],k}var c={ok:`ok`,aus:`aus`,warn:`warn`,info:`info`,fehler:`rot`},l={ok:`text-text-3`,aus:`text-text-3`,warn:`text-bernstein`,info:`text-cyan-text`,fehler:`text-rot-text`},u={ok:`in Ordnung`,aus:`aus`,warn:`braucht Aufmerksamkeit`,info:`Info`,fehler:`Störung`};function d(e){let t=(0,i.c)(25),{bild:o,name:s,wert:d,zustand:f,zahl:p,onClick:m}=e,h=c[f],g;t[0]!==o||t[1]!==h?(g=(0,a.jsx)(r,{bild:o,punkt:h}),t[0]=o,t[1]=h,t[2]=g):g=t[2];let _;t[3]===s?_=t[4]:(_=(0,a.jsx)(`span`,{className:`truncate text-[14.5px] leading-snug font-medium`,children:s}),t[3]=s,t[4]=_);let v=l[f],y;t[5]===v?y=t[6]:(y=n(`truncate text-[12.5px] leading-snug`,v),t[5]=v,t[6]=y);let b;t[7]!==y||t[8]!==d?(b=(0,a.jsx)(`span`,{className:y,children:d}),t[7]=y,t[8]=d,t[9]=b):b=t[9];let x;t[10]===p?x=t[11]:(x=p&&(0,a.jsx)(`span`,{className:n(`truncate text-[12px] leading-snug`,p.stufe===`rot`?`text-rot-text`:p.stufe===`gelb`?`text-bernstein`:`text-text-3`),children:p.text}),t[10]=p,t[11]=x);let S=u[f],C;t[12]===S?C=t[13]:(C=(0,a.jsx)(`span`,{className:`sr-only`,children:S}),t[12]=S,t[13]=C);let w;t[14]!==_||t[15]!==b||t[16]!==x||t[17]!==C?(w=(0,a.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[_,b,x,C]}),t[14]=_,t[15]=b,t[16]=x,t[17]=C,t[18]=w):w=t[18];let T;t[19]!==w||t[20]!==g?(T=(0,a.jsxs)(a.Fragment,{children:[g,w]}),t[19]=w,t[20]=g,t[21]=T):T=t[21];let E=T,D;return t[22]!==E||t[23]!==m?(D=(0,a.jsx)(`li`,{children:m?(0,a.jsx)(`button`,{type:`button`,onClick:m,className:n(`flaeche-innen flex h-full w-full min-w-0 items-center gap-3 rounded-xl px-3 py-2.5 text-left`,`transition-colors hover:border-white/20 hover:bg-white/[0.05]`),children:E}):(0,a.jsx)(`div`,{className:`flaeche-innen flex h-full w-full min-w-0 items-center gap-3 rounded-xl px-3 py-2.5 text-left`,children:E})}),t[22]=E,t[23]=m,t[24]=D):D=t[24],D}export{s as n,d as t}; |