"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,4159],{74778(t,e,o){o.r(e),o.d(e,{LinkClass:()=>w,componentName:()=>p});var n=o(88961),s=o(63200),r=o(25964),i=o(72270),l=o(66434);const p=(0,r.xE)("link"),h=["href","readonly"];class a extends((0,i.qu)({componentName:p,baseSelector:":host a"})){static get observedAttributes(){return h.concat(super.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,r.fz)('\n    :host {\n\t\t\tdisplay: inline-block;\n      line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n    :host([ellipsis="true"]) descope-text {\n      display: inline-flex;\n    }\n    :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n      text-overflow: ellipsis;\n      overflow: hidden;\n      white-space: nowrap;\n    }\n      ',this),this.anchor=this.shadowRoot.querySelector("a"),(0,r.EA)(this,this.anchor,{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,r.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]}),this.anchor.addEventListener("click",t=>{this.readOnly&&t.preventDefault()})}get readOnly(){return"true"===this.getAttribute("readonly")}}const c={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>l.s.componentName}},{anchor:d,text:u,host:m,wrapper:y,link:x}=c,w=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...u,property:"direction"},textAlign:y,textDecoration:{...x,property:"text-decoration",fallback:"none"},textColor:[{...d,property:"color"},{...u,property:l.s.cssVarList.textColor}],cursor:d}}),n.VO,n.tQ)(a);o(63595),customElements.define(p,w)},66434(t,e,o){o.d(e,{T:()=>l,s:()=>a});var n=o(88961),s=o(63200),r=o(25964),i=o(72270);const l=(0,r.xE)("text");class p extends((0,i.qu)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n    <slot part="text-wrapper"></slot>\n    ',(0,r.fz)("\n      :host {\n        display: inline-block;\n        line-height: 1em;\n      }\n      :host > slot {\n        width: 100%;\n        display: inline-block;\n      }\n    ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,r.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:h}={host:{selector:()=>":host"}},a=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{...h,property:"width"},hostDirection:{...h,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.VO,n.tQ)(p)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)}}]);
//# sourceMappingURL=descope-link.js.map