"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,9175],{88568(t,e,n){n.r(e),n.d(e,{RecoveryCodesClass:()=>l,componentName:()=>c}),n(63595),n(37182),n(95260);var o=n(88961),i=n(63200),s=n(25964),r=n(72270),a=n(66434);const c=(0,s.xE)("recovery-codes");class p extends((0,r.qu)({componentName:c,baseSelector:":host > div"})){static get observedAttributes(){return["readonly"]}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n      <div class="wrapper">\n        <div class="list"></div>\n        <descope-text class="icon-wrapper">\n          <vaadin-icon class="icon" icon="vaadin:copy-o" title="Copy"></vaadin-icon>\n        </descope-text>\n      </div>\n    ',this.list=this.shadowRoot.querySelector(".list"),this.icon=this.shadowRoot.querySelector(".icon"),this.iconWrapper=this.shadowRoot.querySelector(".icon-wrapper"),(0,s.fz)("\n      :host {\n        display: inline-block;\n        position: relative;\n      }\n      .wrapper {\n        display: flex;\n        justify-content: space-between;\n      }\n      .list {\n        display: flex;\n        flex-grow: 1;\n        flex-direction: column;\n      }\n      descope-text span {\n        display: inline-flex;\n        align-items: center;\n        width: fit-content;\n      }\n      descope-text span::before {\n        content: '\\02022';\n        transform: translateY(-0.06em);\n      }\n      .icon-wrapper {\n        align-self: flex-start;\n      }\n      .icon {\n        cursor: pointer;\n      }\n      .icon.copied {\n        cursor: initial;\n      }\n      .icon.readonly {\n        pointer-events: none;\n      }\n    ",this)}get variant(){return this.getAttribute("variant")}get mode(){return this.getAttribute("mode")}init(){super.init(),this.icon.addEventListener("click",this.onCopy.bind(this)),(0,s.EA)(this,this.iconWrapper,{includeAttrs:["variant","mode"]})}onCopy(){navigator.clipboard.writeText(String(this.data.map(t=>t.value).join("\n"))),this.icon.setAttribute("icon","vaadin:check-circle-o"),this.icon.setAttribute("title","Copied"),this.icon.classList.add("copied"),setTimeout(()=>{this.icon.setAttribute("icon","vaadin:copy-o"),this.icon.setAttribute("title","Copy"),this.icon.classList.remove("copied")},5e3)}onReadOnly(t){this.icon.classList.toggle("readonly",t)}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&"readonly"===t&&this.onReadOnly("true"===n)}}const l=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostMinWidth:{selector:()=>":host",property:"min-width"},hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>a.s.componentName,property:a.s.cssVarList.hostDirection}],textAlign:{selector:()=>".list",property:"align-items"},iconColor:{selector:()=>"vaadin-icon",property:"color"},iconSize:{selector:()=>"vaadin-icon",property:"font-size"},iconGap:{selector:()=>".wrapper",property:"gap"},bulletGap:{selector:()=>"descope-text span",property:"gap"}}}),(0,o.t$)({itemRenderer:({value:t},e,n)=>`\n    <descope-text variant="${n.variant}" mode="${n.mode}">\n      <span>${t}</span>\n    </descope-text>\n  `,rerenderAttrsList:["variant","mode"],targetSelector:".list"}),o.VO,o.tQ)(p);customElements.define(c,l)},66434(t,e,n){n.d(e,{T:()=>a,s:()=>l});var o=n(88961),i=n(63200),s=n(25964),r=n(72270);const a=(0,s.xE)("text");class c extends((0,r.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n    <slot part="text-wrapper"></slot>\n    ',(0,s.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,s.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:p}={host:{selector:()=>":host"}},l=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),o.VO,o.tQ)(c)},63595(t,e,n){n.r(e),n.d(e,{TextClass:()=>o.s,componentName:()=>o.T});var o=n(66434);customElements.define(o.T,o.s)}}]);
//# sourceMappingURL=descope-recovery-codes.js.map