"use strict";var e=require("@kdcloudjs/kwc"),t=require("../kddsCommon-CICoPypw.js"),s=require("../kddsUtilsVisibility-udynsnvN.js"),i=require("./icon.js"),r=require("./shadowBaseClassPrivate.js"),a=require("../label-DdXuOVTE.js");require("../utilsPrivate-DL4VBetH.js"),require("../client-Co_j5m_k.js"),require("../ssr-RXknEJpO.js"),require("../observable-BXDJFaLN.js"),require("../empty_html-hFq4zm9t.js"),require("../i18n-CP31jeWH.js"),require("./iso8601Utils.js"),require("../colorValid-BBnkvgd_.js");var l=[[t.stylesheet0,s.stylesheet3,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 n=e.parseFragment`<span class="kdds-assistive-text${0}"${2}>${"t1"}</span>`,c={classMap:{"kdds-m-right_xx-small":!0},props:{iconName:"kdfont-youjian",size:"x-small"},key:1};function o(e,t,s,r){const{ti:a,c:l,d:o,sp:d,st:u,t:m,h:h}=e;return[t.hasValue?h("a",{attrs:{href:t.href,tabindex:a(t.tabIndex)},key:0},[t.hideIcon?null:l("kd-icon",i,c),t.hideIcon?null:u(n,3,[d(1,null,o(t.i18n.emailLabel))]),m(o(t.computedLabel))]):null]}var d=e.registerTemplate(o);o.stylesheets=[],o.stylesheetToken="kwc-7agb7c0sg50",o.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedEmail-undefined_formattedEmail",l&&o.stylesheets.push.apply(o.stylesheets,l),e.freezeTemplate(o);const u={emailLabel:a.KingdeeFormattedEmail.emailIconLabel};class m 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 u}}e.registerDecorators(m,{publicProps:{value:{config:0},label:{config:0},tabIndex:{config:0},hideIcon:{config:0}},publicMethods:["focus","blur","click"],fields:["_connected"]});const h=e.registerComponent(m,{tmpl:d,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedEmail-",apiVersion:63});module.exports=h;
