"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["app/user/login-string"],{3210(e,n,t){t.r(n),t.d(n,{default:()=>a});const a=({activationData:e,isNew:n})=>{const t=document.getElementById("general-vcard-email-internalEmail"),a=document.getElementById("general-vcard-email-domain"),d=document.getElementById("general-vcard-email-externalEmail"),c=document.getElementById("general-account-login"),l=document.getElementById("general-account-isActivationRequired");let i,r,g=!1;const s=()=>{g=!0},u=e=>{i||(i=e.target)},o=e=>{g||e.target!==i||(c.value=(()=>{let e="";if(i===t){if(!t.value)return e;e=`${t.value}@${r}`}else i===d&&(e=d.value);return e})())},m=()=>{v(""===d.value)},v=e=>{e&&(l.checked=!e),l.disabled=e},E=()=>{r=a.options[a.selectedIndex].text,i===t&&t.dispatchEvent(new Event("change"))};n&&c&&c instanceof HTMLInputElement&&(t&&(a?(a.addEventListener("change",E),E()):r=document.getElementById("general-vcard-email-internalEmail-domain").innerHTML,t.addEventListener("keyup",u),["change","keyup"].forEach(e=>t.addEventListener(e,o))),d&&(d.addEventListener("keyup",u),["change","keyup"].forEach(e=>d.addEventListener(e,o))),c.addEventListener("change",s)),(e=>{if(!l)return;d&&(d.addEventListener("change",m),m());const n=document.getElementById("general-vcard-roleId"),t=document.getElementById("general-account-isActive"),a=()=>{l.checked&&(t.checked=!1)},c=()=>{t.checked&&(l.checked=!1)},i=()=>{e[n.value]?(t.checked=!1,l.checked=!0):l.checked=!1};n&&(n.addEventListener("change",i),i()),t&&(l.addEventListener("change",a),t.addEventListener("change",c),a(),c())})(e)}}}]);
//# sourceMappingURL=login-string.js.map?f4965d97cce14e374e9f