import{p as t,H as e,c as a,h as s,a as o}from"./index.js";import{a as i}from"./p-CUVZZBqo.js";import{a as c}from"./p-Nvj7WFs_.js";import{c as m}from"./p-DrPpH_9c.js";import{d as n}from"./p-CQvUntGY.js";import{g as r}from"./p-DKo9A5gq.js";import{i as l}from"./p-B3tdsiZv.js";import{d as v}from"./p-CWqMiVYH.js";import{d as p}from"./p-BJnSrRNH.js";import{d as g}from"./p-9VlKyZSl.js";import{d as f}from"./p-DZJk8GrA.js";const b="gov-attachments-item,.gov-attachments-item{display:flex;flex-direction:column}gov-attachments-item__messages>*:last-child,.gov-attachments-item__messages>*:last-child{margin-bottom:0}gov-attachments-item__messages>*,.gov-attachments-item__messages>*{position:relative;top:calc(-1 * var(--spacing-xs))}gov-attachments-item__file,.gov-attachments-item__file{display:flex;gap:var(--spacing-s);max-width:100%}gov-attachments-item__name,.gov-attachments-item__name{display:flex;-moz-column-gap:var(--spacing-s);column-gap:var(--spacing-s);align-items:center;max-width:calc(100% - var(--spacing-s) - var(--icon-size-s) - (var(--spacing-s-nudge) + var(--border-width, 0.0625rem)) * 2);margin:0}gov-attachments-item__name>gov-tooltip,gov-attachments-item__name .gov-tooltip,.gov-attachments-item__name>gov-tooltip,.gov-attachments-item__name .gov-tooltip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--name-color, var(--text-primary))}gov-attachments-item__name span[slot=info],.gov-attachments-item__name span[slot=info]{font-size:var(--font-size-body-xs);line-height:150%;font-weight:400;color:var(--decor-color, var(--text-secondary));white-space:nowrap}";const d=t(class t extends e{constructor(){super();this.__registerHost();this.govRemove=a(this,"gov-remove");this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.h=r(this.host)}async componentDidRender(){if(m()){await n(500);await this.validateAccessibility()}}render(){return s(o,{key:"2b75f45ecc4b9a72a0e471c4f92588e0df19bfb6",class:this.h.classes(i.root),role:"listitem"},s("div",{key:"472c55271bc6a0c10c315e44053ca30a41d667ab",class:i.file},s("div",{key:"13f199a67dcbb07226451d67dc4e0ff242f7b66f",class:i.name},s("gov-tooltip",{key:"b65c03b2f2838b74e163f89ac171eeee527e16c6",position:"top",icon:true},s("slot",{key:"6c273a499bfeb40859ad5ffe79181df25250290d"}),s("gov-tooltip-content",{key:"82ecb87b7f00bcc56a122c54706e9ba614e04bb8"},this.h.getSlotContent(`name`))),s("slot",{key:"a43693ee308113468fa7083771d89f668fbeef53",name:"info"})),s("gov-button",{key:"a735520757a7140199c182e46cedcb3b549796d3",color:"primary",type:"base",size:"s","aria-label":l(this.accessibleRemoveLabel)?this.accessibleRemoveLabel.replace("{FILE_NAME}",this.h.getSlotContent(`name`)||"").trim():null,"aria-labelledby":this.accessibleRemoveLabelledBy,"on-gov-click":this.govRemove.emit},s("gov-icon",{key:"c130f0225431f0b522e0ddbc3e59bb50aa234857",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&s("div",{key:"e3779227622c456d014bd118ab3b9886fd799f57",class:i.messages},s("slot",{key:"eef992883000f87ac5bcd460e53078c08839c920",name:"message"})))}async validateAccessibility(){c(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,i.root,this.host)}get host(){return this}static get style(){return b}},[4,"gov-attachments-item",{accessibleRemoveLabel:[1,"accessible-remove-label"],accessibleRemoveLabelledBy:[1,"accessible-remove-labelledby"],validateAccessibility:[64]}]);function h(){if(typeof customElements==="undefined"){return}const t=["gov-attachments-item","gov-button","gov-icon","gov-tooltip","gov-tooltip-content"];t.forEach((t=>{switch(t){case"gov-attachments-item":if(!customElements.get(t)){customElements.define(t,d)}break;case"gov-button":if(!customElements.get(t)){v()}break;case"gov-icon":if(!customElements.get(t)){p()}break;case"gov-tooltip":if(!customElements.get(t)){g()}break;case"gov-tooltip-content":if(!customElements.get(t)){f()}break}}))}h();export{d as G,h as d};
//# sourceMappingURL=p-2_-up8FX.js.map