1 line
4.1 KiB
JavaScript
1 line
4.1 KiB
JavaScript
import{i as e,r as t,t as n}from"./dist-aE7UmubC.js";import{C as r}from"./index-BjDzWYEf.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)(22),{bild:o,name:s,wert:d,zustand:f,onClick:p}=e,m=c[f],h;t[0]!==o||t[1]!==m?(h=(0,a.jsx)(r,{bild:o,punkt:m}),t[0]=o,t[1]=m,t[2]=h):h=t[2];let g;t[3]===s?g=t[4]:(g=(0,a.jsx)(`span`,{className:`truncate text-[14.5px] leading-snug font-medium`,children:s}),t[3]=s,t[4]=g);let _=l[f],v;t[5]===_?v=t[6]:(v=n(`truncate text-[12.5px] leading-snug`,_),t[5]=_,t[6]=v);let y;t[7]!==v||t[8]!==d?(y=(0,a.jsx)(`span`,{className:v,children:d}),t[7]=v,t[8]=d,t[9]=y):y=t[9];let b=u[f],x;t[10]===b?x=t[11]:(x=(0,a.jsx)(`span`,{className:`sr-only`,children:b}),t[10]=b,t[11]=x);let S;t[12]!==g||t[13]!==y||t[14]!==x?(S=(0,a.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[g,y,x]}),t[12]=g,t[13]=y,t[14]=x,t[15]=S):S=t[15];let C;t[16]!==h||t[17]!==S?(C=(0,a.jsxs)(a.Fragment,{children:[h,S]}),t[16]=h,t[17]=S,t[18]=C):C=t[18];let w=C,T;return t[19]!==w||t[20]!==p?(T=(0,a.jsx)(`li`,{children:p?(0,a.jsx)(`button`,{type:`button`,onClick:p,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:w}):(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:w})}),t[19]=w,t[20]=p,t[21]=T):T=t[21],T}export{s as n,d as t}; |