import*as e from"lit";import*as t from"lit/directives/if-defined.js";import*as i from"lit/directives/class-map.js";import*as r from"lit/decorators.js";var o,s,a={2927(t,i,r){var o,s;t.exports=(o={LitElement:()=>e.LitElement,css:()=>e.css,html:()=>e.html},s={},r.d(s,o),s)},3517(e,i,r){var o,s;e.exports=(o={ifDefined:()=>t.ifDefined},s={},r.d(s,o),s)},4955(e,t,r){var o,s;e.exports=(o={classMap:()=>i.classMap},s={},r.d(s,o),s)},5095(e,t,i){i.d(t,{N_:()=>m,Rq:()=>v,jg:()=>f,wD:()=>h,xC:()=>y,yG:()=>c});var r=i(9609),o=i(4084),s=i(2927),a=i(8899),l=i(4955),n=i(3517),p=i(476),d=function(e,t,i,r){var o,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const f=["a","div","span"],h=["","blue","red","green","yellow","orange"],y=["button","checkbox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","switch","tab"],c=["large","midsize","small"],v=["default","error"];var m;!function(e){let t=class extends s.LitElement{constructor(){super(...arguments),this.color="",this.ariaLabel="",this.ariaRole="link",this.disabled=!1,this.inline=!1,this.inlineStyle=void 0,this.inverted=void 0,this.href="",this.tag="a",this.target="_self",this.size=void 0,this._tabIndex=0,this.autofocus=!1}get tabIndex(){return this._tabIndex}set tabIndex(e){const t=this._tabIndex;this._tabIndex=e,this.requestUpdate("tabIndex",t)}static get styles(){return[o.A,p.A]}firstUpdated(){this.autofocus&&requestAnimationFrame(()=>{this.focus()})}focus(){var e;null===(e=this.linkRef)||void 0===e||e.focus()}blur(){var e;null===(e=this.linkRef)||void 0===e||e.blur()}get linkClassNamesInfo(){return{[`md-link--${this.color}`]:this.color,"md-link--inline":this.inline,[`md-link--inline-style-${this.inlineStyle}`]:!!this.inlineStyle,[`${this.size}`]:!!this.size,inverted:!0===this.inverted,disabled:this.disabled}}get linkElement(){switch(this.tag){case"div":return s.html`
            <div
              class="md-link ${(0,l.classMap)(this.linkClassNamesInfo)}"
              tabindex=${this.tabIndex}
              aria-label=${(0,n.ifDefined)(this.ariaLabel||void 0)}
              aria-disabled=${(0,n.ifDefined)(this.disabled||void 0)}
              role=${this.ariaRole}
              part="link"
            >
              <slot></slot>
            </div>
          `;case"span":return s.html`
            <span
              class="md-link ${(0,l.classMap)(this.linkClassNamesInfo)}"
              tabindex=${this.tabIndex}
              aria-label=${(0,n.ifDefined)(this.ariaLabel||void 0)}
              aria-disabled=${(0,n.ifDefined)(this.disabled||void 0)}
              role=${this.ariaRole}
              part="link"
            >
              <slot></slot>
            </span>
          `;default:return s.html`
            <a
              class="md-link ${(0,l.classMap)(this.linkClassNamesInfo)}"
              .target="${this.target}"
              href=${(0,n.ifDefined)(this.disabled?void 0:this.href)}
              tabindex=${this.tabIndex}
              aria-label=${(0,n.ifDefined)(this.ariaLabel||void 0)}
              aria-disabled=${(0,n.ifDefined)(this.disabled||void 0)}
              role=${this.ariaRole}
              part="link"
            >
              <slot></slot>
            </a>
          `}}render(){return s.html` ${this.linkElement} `}};d([(0,a.property)({type:String,attribute:!1})],t.prototype,"color",void 0),d([(0,a.property)({type:String})],t.prototype,"ariaLabel",void 0),d([(0,a.property)({type:String})],t.prototype,"ariaRole",void 0),d([(0,a.property)({type:Boolean})],t.prototype,"disabled",void 0),d([(0,a.property)({type:Boolean})],t.prototype,"inline",void 0),d([(0,a.property)({type:String,attribute:"inline-style"})],t.prototype,"inlineStyle",void 0),d([(0,a.property)({type:Boolean})],t.prototype,"inverted",void 0),d([(0,a.property)({type:String})],t.prototype,"href",void 0),d([(0,a.property)({type:String})],t.prototype,"tag",void 0),d([(0,a.property)({type:String})],t.prototype,"target",void 0),d([(0,a.property)({type:String})],t.prototype,"size",void 0),d([(0,a.property)({type:Number,attribute:"tab-index",reflect:!0})],t.prototype,"tabIndex",null),d([(0,a.property)({type:Boolean})],t.prototype,"autofocus",void 0),d([(0,a.query)(".md-link")],t.prototype,"linkRef",void 0),t=d([(0,r.w)("md-link")],t),e.ELEMENT=t}(m||(m={}))},8899(e,t,i){var o,s;e.exports=(o={property:()=>r.property,query:()=>r.query},s={},i.d(s,o),s)}},l={};function n(e){var t=l[e];if(void 0!==t)return t.exports;var i=l[e]={exports:{}};return a[e](i,i.exports,n),i.exports}n.m=a,o=[],n.O=(e,t,i,r)=>{if(!t){var s=1/0;for(d=0;d<o.length;d++){for(var[t,i,r]=o[d],a=!0,l=0;l<t.length;l++)(!1&r||s>=r)&&Object.keys(n.O).every(e=>n.O[e](t[l]))?t.splice(l--,1):(a=!1,r<s&&(s=r));if(a){o.splice(d--,1);var p=i();void 0!==p&&(e=p)}}return e}r=r||0;for(var d=o.length;d>0&&o[d-1][2]>r;d--)o[d]=o[d-1];o[d]=[t,i,r]},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{n as __webpack_require__};s={502:0,1745:0,4928:0,5369:0,6060:0,6132:0,8111:0,8442:0},n.C=e=>{var t,i,{__webpack_esm_ids__:r,__webpack_esm_modules__:o,__webpack_esm_runtime__:a}=e,l=0;for(t in o)n.o(o,t)&&(n.m[t]=o[t]);for(a&&a(n);l<r.length;l++)i=r[l],n.o(s,i)&&s[i]&&s[i][0](),s[r[l]]=0;n.O()},n.O.j=e=>0===s[e];import*as p from"../9609.js";n.C(p);import*as d from"../4084.js";n.C(d);import*as f from"../476.js";n.C(f);var h=n.O(void 0,[9609,4084,476],()=>n(5095));const y=(h=n.O(h)).N_,c=h.Rq,v=h.wD,m=h.xC,b=h.yG,u=h.jg;export{y as Link,c as inlineStyle,v as linkColor,m as linkRole,b as linkSize,u as linkTag};