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EAAGoB,KAAE,KAAM,CAAEC,IAAK,2CAA4CK,MAAO,oBAAkB,EAAGN,KAAE,IAAK,CAAEC,IAAK,2CAA4CQ,KAAM,SAAUH,MAAO,gBAAiBF,GAAI,mBAAoBX,KAAM,sBAAuBoB,QAASA,IAAMrC,KAAKc,oBAAkB,EAAGU,KAAE,OAAQ,CAAEC,IAAK,2CAA4CK,MAAO,qBAAsB,cAAe,SAAW,YAAa9B,KAAKU,2BAA2Bc,KAAE,KAAM,CAAEM,MAAO,oBAAkB,EAAGN,KAAE,IAAK,CAAES,KAAM,SAAUH,MAAO,gBAAiBF,GAAI,mBAAoBX,KAAMjB,KAAKK,yBAA2B,mBAAiB,EAAGmB,KAAE,OAAQ,CAAEM,MAAO,uBAAwB,cAAe,SAAW,wBAAsBI,GACrtG,GAEJtC,EAAuBmC,MAxCW","names":["CosoAuthenticationMenu","constructor","hostRef","registerInstance","this","authenticationMenuSignInClicked","createEvent","authenticationMenuSignOutClicked","isAuthenticated","identityProviderEndpoint","tenantName","userName","isMvc","isIdentityProvider","supportsAccountCreation","supportsTenantRename","loginRedirectUrl","logoutRedirectUrl","onSignInClicked","_a","location","href","document","getElementById","submit","emit","onSignOutClicked","render","h","key","method","action","id","name","class","style","display","role","undefined","tabindex","type","onClick"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./node_modules/@coso/layout/dist/esm/coso-authentication-menu.entry.js"],"sourcesContent":["import { r as registerInstance, c as createEvent, h } from './index-0859a102.js';\n\nconst cosoAuthenticationMenuCss = \":host{display:block}button.dropdown-item.hand:focus-visible{background-color:var(--focus-background-color);color:var(--focus-color);outline:none !important}button.dropdown-button{background-color:transparent;border:none;width:100%;text-align:left}button.dropdown-button:focus-visible{background-color:var(--focus-background-color);color:var(--focus-color) !important;outline:none !important}\";\nconst CosoAuthenticationMenuStyle0 = cosoAuthenticationMenuCss;\n\nconst CosoAuthenticationMenu = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.authenticationMenuSignInClicked = createEvent(this, \"authenticationMenuSignInClicked\", 7);\n this.authenticationMenuSignOutClicked = createEvent(this, \"authenticationMenuSignOutClicked\", 7);\n this.isAuthenticated = false;\n this.identityProviderEndpoint = \"\";\n this.tenantName = null;\n this.userName = null;\n this.isMvc = false;\n this.isIdentityProvider = false;\n this.supportsAccountCreation = true;\n this.supportsTenantRename = false;\n this.loginRedirectUrl = \"/Authentication/Login\";\n this.logoutRedirectUrl = \"/Authentication/Logout\";\n }\n onSignInClicked() {\n var _a;\n if (this.isIdentityProvider) {\n location.href = this.loginRedirectUrl;\n }\n else if (this.isMvc) {\n (_a = document.getElementById(\"loginForm\")) === null || _a === void 0 ? void 0 : _a.submit();\n }\n this.authenticationMenuSignInClicked.emit();\n }\n onSignOutClicked() {\n var _a;\n if (this.isMvc) {\n (_a = document.getElementById(\"logoutForm\")) === null || _a === void 0 ? void 0 : _a.submit();\n }\n this.authenticationMenuSignOutClicked.emit();\n }\n render() {\n return (h(\"form\", { key: '6e0a33f40e5d8977ec3ec818f1616b35a75ae0d0', method: \"POST\", action: this.isAuthenticated ? this.logoutRedirectUrl : this.loginRedirectUrl, id: this.isAuthenticated ? \"logoutForm\" : \"loginForm\" }, h(\"slot\", { key: '57dcf1d9c8976cd049f65d6d414aadc07c7d8b20', name: \"antiForgeryToken\" }), h(\"ul\", { key: '744b082051a130e645cd6b3d26c401ffc4a7b8ea', class: \"nav navbar-nav navbar-right\", style: { display: this.isAuthenticated ? \"block\" : \"none\" } }, h(\"li\", { key: '22503ee1663f0dbf388acec8d9f031a7f8e92977', class: \"nav-item dropdown\" }, h(\"a\", { key: 'fd7ae5742ae41e0d451c357475952129dd6223d6', class: \"nav-link dropdown-toggle\", href: \"javascript:void(0);\", id: \"navbarDropdown\", role: \"button\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" }, h(\"span\", { key: 'a560e2ec6aa08a51f840a4d758eeca9dee8ab97f', class: \"fa fa-user mr-1\", style: { \"font-size\": \"1.1em\" }, \"aria-hidden\": \"true\" }), h(\"span\", { key: '6a0c0f8e53a3c031ce562ec2564ee3114aa5b329', class: \"ellipsisEmail\", id: \"userInfo\" }, this.userName, \" \", this.tenantName ? `[${this.tenantName}]` : undefined)), h(\"div\", { key: '941ee433e7b3545ad5ecb1bc9d9b5eb4d4349bd0', class: \"dropdown-menu dropdown-menu-right\", role: \"menu\", \"aria-labelledby\": \"navbarDropdown\" }, h(\"slot\", { key: '81878b5d1e7c0100ba6710695adb0d5cbf15a720', name: \"dropdownMenuUserAuthenticated\" }, h(\"a\", { key: '1debaa6e5b00e091f68a2a4a412dd3363b47cd11', href: this.identityProviderEndpoint + \"/User/ChangePassword\", tabindex: \"0\", class: \"dropdown-item\" }, h(\"span\", { key: '478b2b145bc193b020169c332871e9b896f7bb29', class: \"fa fa-key mr-1\", style: { \"font-size\": \"1.1em\" }, \"aria-hidden\": \"true\" }), \"Change Password\")), (this.isAuthenticated && this.supportsTenantRename) && (h(\"a\", { href: this.identityProviderEndpoint + \"/Tenant/ChangeTenant\", tabindex: \"0\", class: \"dropdown-item\" }, h(\"span\", { class: \"fa fa-building mr-1\", style: { \"font-size\": \"1.1em\" }, \"aria-hidden\": \"true\" }), \"Rename Company\")), h(\"div\", { key: '855c6ba5b79389ee8d3e96210dd9006de9c5099b', class: \"dropdown-divider\" }), h(\"button\", { key: '1ce4b09aef7e9e98c97083a02ac99c98afb740e1', type: \"button\", onClick: () => this.onSignOutClicked(), tabindex: \"0\", class: \"dropdown-item hand\", id: \"logOutLink\" }, h(\"span\", { key: 'a6efb78bb0eae955f2ec68e665692cb5e967af39', class: \"fa fa-sign-out mr-1\", style: { \"font-size\": \"1.1em\" }, \"aria-hidden\": \"true\" }), \"Sign out\")))), h(\"ul\", { key: '6d051c10fa7fec290a272f03064e57ea2f3fdc96', class: \"navbar-nav\", style: { display: this.isAuthenticated ? \"none\" : \"flex\" } }, h(\"li\", { key: 'f8accc33bacc0f9ae16720d0bc1b880884a3930f', class: \"active nav-item\" }, h(\"a\", { key: 'e23909878e830a963a124e30a85624c975ec0ef5', role: \"button\", class: \"nav-link hand\", id: \"alreadyMemberBtn\", href: \"javascript:void(0);\", onClick: () => this.onSignInClicked() }, h(\"span\", { key: '987c0a62d1e02fd377598af82b88f1aa599406f1', class: \"fa fa-sign-in mr-1\", \"aria-hidden\": \"true\" }), \"Sign In\")), this.supportsAccountCreation ? (h(\"li\", { class: \"active nav-item\" }, h(\"a\", { role: \"button\", class: \"nav-link hand\", id: \"createAccountBtn\", href: this.identityProviderEndpoint + \"/Tenant/Create\" }, h(\"span\", { class: \"fa fa-user-plus mr-1\", \"aria-hidden\": \"true\" }), \"Create Account\"))) : undefined)));\n }\n};\nCosoAuthenticationMenu.style = CosoAuthenticationMenuStyle0;\n\nexport { CosoAuthenticationMenu as coso_authentication_menu };\n\n"],"x_google_ignoreList":[0]}