import{p as t,H as i,h as s,a as e}from"./index.js";import{p as a}from"./p-CQvUntGY.js";import{S as o}from"./p-BcQO4NH2.js";import{C as n}from"./p-U40vKHrs.js";import{g as r}from"./p-DKo9A5gq.js";import{v as h}from"./p-BKP-F1qP.js";import{A as l,a as c,i as p}from"./p-CXgom82_.js";const m=a(o,["_XS","_S","_M","_L","_XL"]);a(n,["PRIMARY","NEUTRAL"]);var d;(function(t){t["CIRCLE"]="circle";t["LINE"]="line"})(d||(d={}));var u;(function(t){t["PULSE"]="pulse";t["PROGRESS"]="progress";t["FALSE"]="false"})(u||(u={}));const v={root:"gov-skeleton"};const f=t(class t extends i{constructor(){super();this.__registerHost();this.size="m";this.color="neutral";this.shape="line";this.width=null;this.height=null;this.animation="progress";this.items=[];this.inheritedAttributes={};this.h=r(this.host)}validateSize(t){h(m,t,v.root)}validateShape(t){h(d,t,v.root)}validateAnimation(t){h(u,t,v.root)}componentDidLoad(){this.attributeObserver=new l(this.host,((t,i)=>{this.onAriaAttributeChange(t,i)}));this.attributeObserver.startObserving(c)}componentWillLoad(){this.validateSize(this.size);this.validateShape(this.shape);this.validateAnimation(this.animation);this.init();this.inheritedAttributes=p(this.host)}componentWillUpdate(){this.init()}disconnectedCallback(){var t;(t=this.attributeObserver)===null||t===void 0?void 0:t.stopObserving()}onAriaAttributeChange(t,i){this.host.removeAttribute(t);this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:i})}init(){this.items.fill(1)}render(){return s(e,Object.assign({key:"871f22b2b3bd0c92c75b81b4d649246414c01b97",size:this.size,color:this.color,class:{[v.root]:true,circle:this.shape==="circle",line:this.shape==="line",progress:this.animation==="progress",pulse:this.animation==="pulse"}},this.inheritedAttributes,{"aria-busy":"true","aria-valuemin":"0","aria-valuemax":"100",role:"progressbar",tabindex:"0",style:{width:this.width,height:this.height}}))}get host(){return this}static get watchers(){return{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}}},[0,"gov-skeleton",{size:[513],color:[1],shape:[1],width:[513],height:[513],animation:[1],inheritedAttributes:[32]},undefined,{size:["validateSize"],shape:["validateShape"],animation:["validateAnimation"]}]);function g(){if(typeof customElements==="undefined"){return}const t=["gov-skeleton"];t.forEach((t=>{switch(t){case"gov-skeleton":if(!customElements.get(t)){customElements.define(t,f)}break}}))}g();export{f as G,g as d};
//# sourceMappingURL=p-D8QfVS4O.js.map