import{c as _,h as $,a as w,b as f}from"./index-iCRehgtD.js";const e=_({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(t,{slots:o}){const s=f(()=>parseInt(t.lines,10)),l=f(()=>"q-item__label"+(t.overline===!0?" q-item__label--overline text-overline":"")+(t.caption===!0?" q-item__label--caption text-caption":"")+(t.header===!0?" q-item__label--header":"")+(s.value===1?" ellipsis":"")),i=f(()=>t.lines!==void 0&&s.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":s.value}:null);return()=>$("div",{style:i.value,class:l.value},w(o.default))}});function u(t,o,s=`${o}s`){return t===1?`1 ${o}`:`${t??"-"} ${s}`}function p(t){return[t==null?void 0:t.vendor,t==null?void 0:t.model].filter(Boolean).join(" ")||(t==null?void 0:t.identifier)||(t==null?void 0:t.display_name)||(t==null?void 0:t.path)||"-"}function L(t){const o=(t==null?void 0:t.identifier)||(t==null?void 0:t.display_name)||(t==null?void 0:t.path)||"-";return`Firmware ${(t==null?void 0:t.firmware_version)||"-"} · Identifier ${o}`}function k(t){var o,s,l,i;return[u((o=t==null?void 0:t.status)==null?void 0:o.slots,"slot"),u((s=t==null?void 0:t.status)==null?void 0:s.ie_slots,"i/e slot"),u((l=t==null?void 0:t.status)==null?void 0:l.robot_arms,"robot arm"),u((i=t==null?void 0:t.status)==null?void 0:i.drives,"tape drive")].join(" · ")}function y(t,o,s){return[`${t}.`,(s==null?void 0:s.vendor)||"-",(s==null?void 0:s.model)||"-",(s==null?void 0:s.serial_number)||"-",`Element ${(o==null?void 0:o.element_address)??"-"}`].join(" ")}function q(t,o){return((t==null?void 0:t.drive_identifiers)??[]).map((s,l)=>{const i=new Set((s==null?void 0:s.identifiers)??[]),m=(o??[]).find(d=>((d==null?void 0:d.device_identifiers)??[]).some(b=>i.has(b)));return{key:`${(t==null?void 0:t.path)||"changer"}-${(s==null?void 0:s.element_address)??l}`,path:(m==null?void 0:m.path)||null,label:y(l+1,s,m),tapeDrive:m}})}export{e as Q,L as a,k as b,p as f,q as r};
