{"ast":null,"code":"import { GetLocalTheme, Theme } from 'src/app/services/color-mode.service';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"src/app/services/color-mode.service\";\nimport * as i2 from \"@angular/common\";\nconst _c0 = a0 => ({\n \"active\": a0,\n \"dropdown-item d-flex align-items-center\": true\n});\nexport class ColorModeBttnComponent {\n constructor(cModeService) {\n this.cModeService = cModeService;\n this.Themes = Theme;\n this.theme = GetLocalTheme();\n }\n ngOnInit() {\n this.cModeService.updateTheme();\n }\n onClick(theme) {\n this.theme = theme;\n let theTheme = theme;\n this.cModeService.setTheme(theTheme);\n }\n static #_ = this.ɵfac = function ColorModeBttnComponent_Factory(t) {\n return new (t || ColorModeBttnComponent)(i0.ɵɵdirectiveInject(i1.ColorModeService));\n };\n static #_2 = this.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: ColorModeBttnComponent,\n selectors: [[\"app-color-mode-bttn\"]],\n decls: 38,\n vars: 9,\n consts: [[\"xmlns\", \"http://www.w3.org/2000/svg\", 1, \"d-none\"], [\"id\", \"check2\", \"viewBox\", \"0 0 16 16\"], [\"d\", \"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z\"], [\"id\", \"circle-half\", \"viewBox\", \"0 0 16 16\"], [\"d\", \"M8 15A7 7 0 1 0 8 1v14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z\"], [\"id\", \"moon-stars-fill\", \"viewBox\", \"0 0 16 16\"], [\"d\", \"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z\"], [\"d\", \"M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z\"], [\"id\", \"sun-fill\", \"viewBox\", \"0 0 16 16\"], [\"d\", \"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z\"], [1, \"dropdown\", \"bd-mode-toggle\"], [\"id\", \"bd-theme\", \"type\", \"button\", \"aria-expanded\", \"false\", \"data-bs-toggle\", \"dropdown\", \"aria-label\", \"Toggle theme (auto)\", 1, \"btn\", \"py-2\", \"dropdown-toggle\", \"d-flex\", \"align-items-center\"], [\"width\", \"1em\", \"height\", \"1em\", \"viewBox\", \"0 0 16 16\", 1, \"bi\", \"my-1\", \"theme-icon-active\"], [\"href\", \"#circle-half\"], [\"id\", \"bd-theme-text\", 1, \"visually-hidden\"], [\"aria-labelledby\", \"bd-theme-text\", 1, \"dropdown-menu\", \"dropdown-menu-end\", \"shadow\"], [\"type\", \"button\", \"data-bs-theme-value\", \"light\", \"aria-pressed\", \"false\", 3, \"click\", \"ngClass\"], [\"width\", \"1em\", \"height\", \"1em\", 1, \"bi\", \"me-2\", \"opacity-50\"], [\"href\", \"#sun-fill\"], [\"width\", \"1em\", \"height\", \"1em\", 1, \"bi\", \"ms-auto\", \"d-none\"], [\"href\", \"#check2\"], [\"type\", \"button\", \"data-bs-theme-value\", \"dark\", \"aria-pressed\", \"false\", 3, \"click\", \"ngClass\"], [\"href\", \"#moon-stars-fill\"], [\"type\", \"button\", \"data-bs-theme-value\", \"auto\", \"aria-pressed\", \"true\", 3, \"click\", \"ngClass\"]],\n template: function ColorModeBttnComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0)(1, \"symbol\", 1);\n i0.ɵɵelement(2, \"path\", 2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"symbol\", 3);\n i0.ɵɵelement(4, \"path\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"symbol\", 5);\n i0.ɵɵelement(6, \"path\", 6)(7, \"path\", 7);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(8, \"symbol\", 8);\n i0.ɵɵelement(9, \"path\", 9);\n i0.ɵɵelementEnd()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(10, \"div\", 10)(11, \"button\", 11);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(12, \"svg\", 12);\n i0.ɵɵelement(13, \"use\", 13);\n i0.ɵɵelementEnd();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(14, \"span\", 14);\n i0.ɵɵtext(15, \"Toggle theme\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(16, \"ul\", 15)(17, \"li\")(18, \"button\", 16);\n i0.ɵɵlistener(\"click\", function ColorModeBttnComponent_Template_button_click_18_listener() {\n return ctx.onClick(ctx.Themes.Light);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(19, \"svg\", 17);\n i0.ɵɵelement(20, \"use\", 18);\n i0.ɵɵelementEnd();\n i0.ɵɵtext(21, \" Light \");\n i0.ɵɵelementStart(22, \"svg\", 19);\n i0.ɵɵelement(23, \"use\", 20);\n i0.ɵɵelementEnd()()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(24, \"li\")(25, \"button\", 21);\n i0.ɵɵlistener(\"click\", function ColorModeBttnComponent_Template_button_click_25_listener() {\n return ctx.onClick(ctx.Themes.Dark);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(26, \"svg\", 17);\n i0.ɵɵelement(27, \"use\", 22);\n i0.ɵɵelementEnd();\n i0.ɵɵtext(28, \" Dark \");\n i0.ɵɵelementStart(29, \"svg\", 19);\n i0.ɵɵelement(30, \"use\", 20);\n i0.ɵɵelementEnd()()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(31, \"li\")(32, \"button\", 23);\n i0.ɵɵlistener(\"click\", function ColorModeBttnComponent_Template_button_click_32_listener() {\n return ctx.onClick(ctx.Themes.Auto);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(33, \"svg\", 17);\n i0.ɵɵelement(34, \"use\", 13);\n i0.ɵɵelementEnd();\n i0.ɵɵtext(35, \" Auto \");\n i0.ɵɵelementStart(36, \"svg\", 19);\n i0.ɵɵelement(37, \"use\", 20);\n i0.ɵɵelementEnd()()()()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(18);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(3, _c0, ctx.theme == ctx.Themes.Light));\n i0.ɵɵadvance(7);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(5, _c0, ctx.theme == ctx.Themes.Dark));\n i0.ɵɵadvance(7);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(7, _c0, ctx.theme == ctx.Themes.Auto));\n }\n },\n dependencies: [i2.NgClass],\n styles: [\".bi[_ngcontent-%COMP%] {\\n vertical-align: -.125em;\\n fill: currentColor;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbG9yLW1vZGUtYnR0bi5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsdUJBQXVCO0VBQ3ZCLGtCQUFrQjtBQUNwQiIsImZpbGUiOiJjb2xvci1tb2RlLWJ0dG4uY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5iaSB7XHJcbiAgdmVydGljYWwtYWxpZ246IC0uMTI1ZW07XHJcbiAgZmlsbDogY3VycmVudENvbG9yO1xyXG59Il19 */\\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvY29tcG9uZW50cy9jb21tb24vY29sb3ItbW9kZS1idHRuL2NvbG9yLW1vZGUtYnR0bi5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsdUJBQXVCO0VBQ3ZCLGtCQUFrQjtBQUNwQjtBQUNBLHdYQUF3WCIsInNvdXJjZXNDb250ZW50IjpbIi5iaSB7XHJcbiAgdmVydGljYWwtYWxpZ246IC0uMTI1ZW07XHJcbiAgZmlsbDogY3VycmVudENvbG9yO1xyXG59Il0sInNvdXJjZVJvb3QiOiIifQ== */\"]\n });\n}","map":{"version":3,"names":["GetLocalTheme","Theme","ColorModeBttnComponent","constructor","cModeService","Themes","theme","ngOnInit","updateTheme","onClick","theTheme","setTheme","_","i0","ɵɵdirectiveInject","i1","ColorModeService","_2","selectors","decls","vars","consts","template","ColorModeBttnComponent_Template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵtext","ɵɵlistener","ColorModeBttnComponent_Template_button_click_18_listener","Light","ColorModeBttnComponent_Template_button_click_25_listener","Dark","ColorModeBttnComponent_Template_button_click_32_listener","Auto","ɵɵadvance","ɵɵproperty","ɵɵpureFunction1","_c0"],"sources":["E:\\TekH\\Visual Studio\\WebUserManager\\DigitalData.UserManager.NgWebUI\\ClientApp\\src\\app\\components\\common\\color-mode-bttn\\color-mode-bttn.component.ts","E:\\TekH\\Visual Studio\\WebUserManager\\DigitalData.UserManager.NgWebUI\\ClientApp\\src\\app\\components\\common\\color-mode-bttn\\color-mode-bttn.component.html"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\nimport { ColorModeService, GetLocalTheme, Theme } from 'src/app/services/color-mode.service';\r\n\r\n@Component({\r\n selector: 'app-color-mode-bttn',\r\n templateUrl: './color-mode-bttn.component.html',\r\n styleUrl: './color-mode-bttn.component.css'\r\n})\r\nexport class ColorModeBttnComponent implements OnInit {\r\n constructor(private cModeService: ColorModeService) { \r\n this.theme = GetLocalTheme();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.cModeService.updateTheme();\r\n }\r\n\r\n readonly Themes = Theme;\r\n\r\n theme : Theme;\r\n onClick(theme: Theme) {\r\n this.theme = theme;\r\n let theTheme:Theme = theme;\r\n this.cModeService.setTheme(theTheme);\r\n }\r\n}\r\n","\r\n