import{r as t,h as e,H as a,g as s,c as i}from"./p-ClISz4NF.js";import{b as o,v as c}from"./p-CDIRBJsi.js";import{c as n}from"./p-CgDnDrq5.js";import{d as m}from"./p-CQvUntGY.js";import{g as r}from"./p-CoD1xawt.js";import{i as l}from"./p-DNztiAH0.js";import{F as h,a as f}from"./p-EeKNA85D.js";import{v as g}from"./p-NOJjz9dT.js";import{c as d}from"./p-vN03FcXN.js";import"./p-U40vKHrs.js";import"./p-BcQO4NH2.js";const v={root:"gov-attachments",label:"gov-attachments__label",list:"gov-attachments__list"};const b={root:"gov-attachments-item",name:"gov-attachments-item__name",file:"gov-attachments-item__file",messages:"gov-attachments-item__messages"};const p=class{constructor(e){t(this,e);this.h=r(this.host)}async componentDidRender(){if(n()){await m(500);await this.validateWcag()}}render(){return e(a,{key:"80effc5b697215f9a0cf731b6562c137edbc0efa",class:this.h.classes(v.root)},this.label?e("p",{class:v.label},this.label):null,e("div",{key:"3b7388299a3da27be78732562ded94bb6581525b",class:v.list,role:"list","aria-label":this.wcagLabel},e("slot",{key:"38c1592a7501f166a462fbb70eef92d6c855d0ec"})))}async validateWcag(){o(this.wcagLabel,"wcag-label",v.root)}get host(){return s(this)}};const _="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 y=class{constructor(e){t(this,e);this.govRemove=i(this,"gov-remove");this.accessibleRemoveLabel="Odebrat soubor {FILE_NAME}";this.h=r(this.host)}async componentDidRender(){if(n()){await m(500);await this.validateAccessibility()}}render(){return e(a,{key:"2b75f45ecc4b9a72a0e471c4f92588e0df19bfb6",class:this.h.classes(b.root),role:"listitem"},e("div",{key:"472c55271bc6a0c10c315e44053ca30a41d667ab",class:b.file},e("div",{key:"13f199a67dcbb07226451d67dc4e0ff242f7b66f",class:b.name},e("gov-tooltip",{key:"b65c03b2f2838b74e163f89ac171eeee527e16c6",position:"top",icon:true},e("slot",{key:"6c273a499bfeb40859ad5ffe79181df25250290d"}),e("gov-tooltip-content",{key:"82ecb87b7f00bcc56a122c54706e9ba614e04bb8"},this.h.getSlotContent(`name`))),e("slot",{key:"a43693ee308113468fa7083771d89f668fbeef53",name:"info"})),e("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},e("gov-icon",{key:"c130f0225431f0b522e0ddbc3e59bb50aa234857",slot:"icon-start",name:"x-lg",type:"components"}))),this.h.hasSlot("message")&&e("div",{key:"e3779227622c456d014bd118ab3b9886fd799f57",class:b.messages},e("slot",{key:"eef992883000f87ac5bcd460e53078c08839c920",name:"message"})))}async validateAccessibility(){c(this.accessibleRemoveLabel,this.accessibleRemoveLabelledBy,b.root,this.host)}get host(){return s(this)}};y.style=_;const u=class{constructor(e){t(this,e);this.color="neutral";this.size="m";this.h=r(this.host);this.messageId=d("GovFormMessage")}validateColor(t){g(f,t,h.root)}componentWillLoad(){this.validateColor(this.color)}render(){return e(a,{key:"f23989a9ea8f6c47ae43cbc8655a9c7d281d36e6",class:this.h.classes(h.root),color:this.color,size:this.size},this.h.hasSlot("icon")&&e("slot",{key:"0cfae3a030761bbd352411054f2a89a13da07bee",name:"icon"}),e("span",{key:"f2d7c7a835f38b3bfe006c75fae9f8a25db7e5e1",id:this.messageId,class:h.content},e("slot",{key:"c6e752c2143d5002a50c233a1ea6cd73ef5e61b9"})))}async identifier(){return this.messageId}get host(){return s(this)}static get watchers(){return{color:["validateColor"]}}};export{p as gov_attachments,y as gov_attachments_item,u as gov_form_message};
//# sourceMappingURL=p-fe3bd57c.entry.js.map