import{parseFragment as e,registerTemplate as t,freezeTemplate as s,registerDecorators as i,registerComponent as o}from"@kdcloudjs/kwc";import{s as a}from"../kddsCommon-CucK_w70.js";import{s as l}from"../kddsUtilsVisibility-BQdWrRzW.js";import n from"./icon.js";import r from"./shadowBaseClassPrivate.js";import{d as c}from"../label-CY8Q8HAO.js";import"./utilsPrivate.js";import"../client-Ddi3i8XR.js";import"../ssr-C2pjZzfv.js";import"../observable-tloG64m6.js";import"../empty_html-CjXB8rB4.js";import"../i18n-B98kiI7M.js";import"../normalize-C0Pp7GJL.js";import"./iso8601Utils.js";import"../colorValid-qIPgkqGp.js";var d=[[a,l,function(e,t,s){return(t?":host kd-icon":(e?"["+e+"-host]":"")+" kd-icon")+(e?"["+e+"]":"")+" {vertical-align: middle;}"}],function(e,t,s){return(t?":host([data-is-datatable]) kd-icon":(e?"["+e+"-host]":"")+"[data-is-datatable] kd-icon")+(e?"["+e+"]":"")+" {margin-inline-end: var(--kdds-g-spacing-2, 0.5rem);}"}];const m=e`<span class="kdds-assistive-text${0}"${2}>${"t1"}</span>`,h={classMap:{"kdds-m-right_xx-small":!0},props:{iconName:"kdfont-youjian",size:"x-small"},key:1};function u(e,t,s,i){const{ti:o,c:a,d:l,sp:r,st:c,t:d,h:u}=e;return[t.hasValue?u("a",{attrs:{href:t.href,tabindex:o(t.tabIndex)},key:0},[t.hideIcon?null:a("kd-icon",n,h),t.hideIcon?null:c(m,3,[r(1,null,l(t.i18n.emailLabel))]),d(l(t.computedLabel))]):null]}var p=t(u);u.stylesheets=[],u.stylesheetToken="kwc-7agb7c0sg50",u.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedEmail-undefined_formattedEmail",d&&u.stylesheets.push.apply(u.stylesheets,d),s(u);const k={emailLabel:c.emailIconLabel};class b extends r{constructor(...e){super(...e),this.value=void 0,this.label=void 0,this.tabIndex=void 0,this.hideIcon=!1,this._connected=!1}connectedCallback(){super.connectedCallback(),this._connected=!0}disconnectedCallback(){this._connected=!1}focus(){this.emailAnchor&&this.emailAnchor.focus()}blur(){this.emailAnchor&&this.emailAnchor.blur()}click(){const e=this.emailAnchor;e&&e.click&&e.click()}get emailAnchor(){if(this._connected&&this.hasValue)return this.template.querySelector("a")}get trimmedValue(){return(this.value||"").trim()}get trimmedLabel(){return(this.label||"").trim()}get hasValue(){return!!this.trimmedValue}get href(){return`mailto:${this.trimmedValue}`}get computedLabel(){return this.trimmedLabel||this.trimmedValue}get i18n(){return k}}i(b,{publicProps:{value:{config:0},label:{config:0},tabIndex:{config:0},hideIcon:{config:0}},publicMethods:["focus","blur","click"],fields:["_connected"]});const f=o(b,{tmpl:p,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedEmail-",apiVersion:63});export{f as default};
