{"version":3,"sources":["webpack:///./src/views/dashboard/applications/show/Credentials.vue?79ec","webpack:///./src/views/dashboard/applications/show/Credentials.vue","webpack:///./src/views/dashboard/applications/show/Credentials.vue?0b4a","webpack:///./src/views/dashboard/applications/show/Credentials.vue?63e0"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","key","_hoisted_5","_hoisted_6","_hoisted_7","render","_ctx","_cache","$props","$setup","$data","$options","_component_mpx_icon","_resolveComponent","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","$t","_createTextVNode","clientId","href","onClick","$event","copyToClipboard","_createVNode","variant","clientSecret","_createCommentVNode","type","args","regenerateSecretHmacAuthApplication","isRegeneratedApplication","defineComponent","components","MpxIcon","data","computed","applicationName","get","_this$$store$state$ap","this","$store","state","application","hmacAuthApplication","name","set","commit","APPLICATION_SET_NAME","_this$$store$state$ap2","_this$$store$state$ap3","methods","_this$$store$state$ap4","metadata","Remarks","Reason","CompanySSOID","companyId","dataEvent","_this$$store$state$ap5","dispatch","APPLICATION_REGENRATE_SECRET_HMAC_AUTH","uuid","id","pageName","mixpanelInstance","setMetadata","emit","event","RegenerateSecretApplication","err","response","message","handleError","text","navigator","clipboard","writeText","SHOW_TOAST","ToastType","ERROR","__exports__"],"mappings":"gLAEA,MAAMA,EAAa,CAAEC,MAAO,QACtBC,EAAa,CAAED,MAAO,cACtBE,EAAa,CAAEF,MAAO,cACtBG,EAAa,CAAEC,IAAK,GACpBC,EAAa,CACjBD,IAAK,EACLJ,MAAO,eAEHM,EAAa,CAAEF,IAAK,GACpBG,EAAa,CAAEP,MAAO,cAEtB,SAAUQ,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,MAAMC,EAAsBC,eAAkB,YAE9C,OAAQC,iBAAcC,eAAoB,MAAOnB,EAAY,CAC3DoB,eAAoB,MAAOlB,EAAY,CACrCkB,eAAoB,QAAS,KAAMC,eAAiBX,EAAKY,GAAG,kDAAmD,GAC/GF,eAAoB,M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,OAAUC,Y,iCCnFxB,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS7E,GAAQ,CAAC,YAAY,qBAE1E,gB,kCCTf","file":"js/application-show-credentials.718b3d10.js","sourcesContent":["import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"form\" }\nconst _hoisted_2 = { class: \"form-group\" }\nconst _hoisted_3 = { class: \"form-group\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = {\n key: 1,\n class: \"description\"\n}\nconst _hoisted_6 = { key: 2 }\nconst _hoisted_7 = { class: \"form-group\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_mpx_icon = _resolveComponent(\"mpx-icon\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t(\"pages.applications.credentials.form.client_id\")), 1),\n _createElementVNode(\"div\", null, [\n _createTextVNode(_toDisplayString(_ctx.clientId) + \" \", 1),\n _createElementVNode(\"a\", {\n href: \"#\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.copyToClipboard(_ctx.clientId)))\n }, [\n _createVNode(_component_mpx_icon, { variant: 'file-copy' })\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t(\"pages.applications.credentials.form.client_secret\")), 1),\n (_ctx.clientSecret)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createTextVNode(_toDisplayString(_ctx.clientSecret) + \" \", 1),\n _createElementVNode(\"a\", {\n href: \"#\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (_ctx.copyToClipboard(_ctx.clientSecret)))\n }, [\n _createVNode(_component_mpx_icon, { variant: 'file-copy' })\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.clientSecret)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, _toDisplayString(_ctx.$t(\n \"pages.create_hmac_auth_application.form.client_secret.description\"\n )), 1))\n : _createCommentVNode(\"\", true),\n (!_ctx.clientSecret)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, _toDisplayString(_ctx.$t(\"pages.applications.credentials.value.hidden_client_secret\")), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n type: \"button\",\n class: \"btn btn-primary field-submit\",\n onClick: _cache[2] || (_cache[2] = \n//@ts-ignore\n(...args) => (_ctx.regenerateSecretHmacAuthApplication && _ctx.regenerateSecretHmacAuthApplication(...args)))\n }, _toDisplayString(_ctx.isRegeneratedApplication\n ? _ctx.$t(\n \"pages.regenerate_secret_hmac_auth_applications.form.button.saving\"\n )\n : _ctx.$t(\n \"pages.regenerate_secret_hmac_auth_applications.form.button.update\"\n )), 1)\n ])\n ]))\n}","\nimport { defineComponent } from \"vue\";\nimport MpxIcon from \"@mekari/pixel/src/js/components/Icon/index.vue\";\nimport {\n APPLICATION_REGENRATE_SECRET_HMAC_AUTH,\n APPLICATION_SET_NAME,\n} from \"@/store-types\";\nimport { SHOW_TOAST } from \"@/store-types\";\nimport { TYPE as ToastType } from \"vue-toastification\";\nimport { emit } from \"@/utils/event\";\nimport { event, evenType } from \"@/events/mixpanel/enums/applications\";\nimport { mixpanelInstance } from \"@/utils/mixpanel\";\n\ninterface Data {\n isRegeneratedApplication: boolean;\n}\n\nexport default defineComponent({\n components: {\n MpxIcon,\n },\n data(): Data {\n return {\n isRegeneratedApplication: false,\n };\n },\n computed: {\n applicationName: {\n // getter\n get: function () {\n return this.$store.state.application.hmacAuthApplication?.name;\n },\n // setter\n set: function (name: string) {\n this.$store.commit(APPLICATION_SET_NAME, name);\n },\n },\n clientId(): string | undefined {\n return this.$store.state.application?.hmacAuthApplication?.clientId;\n },\n clientSecret(): string | undefined {\n return this.$store.state.application?.hmacAuthApplication?.clientSecret;\n },\n },\n methods: {\n async regenerateSecretHmacAuthApplication() {\n if (this.isRegeneratedApplication) {\n return;\n }\n\n this.isRegeneratedApplication = true;\n\n const metadata = {\n Remarks: \"Success\",\n Reason: \"Success Regenerate Secret\",\n CompanySSOID:\n this.$store.state.application.hmacAuthApplication?.companyId,\n };\n const dataEvent = {\n Remarks: \"Success\",\n Reason: \"Success Regenerate Secret\",\n };\n\n try {\n await this.$store.dispatch(APPLICATION_REGENRATE_SECRET_HMAC_AUTH, {\n uuid: this.$store.state.application.hmacAuthApplication?.id,\n pageName: \"Applications\",\n });\n mixpanelInstance.setMetadata(metadata);\n emit(event.RegenerateSecretApplication, dataEvent);\n } catch (err) {\n dataEvent.Remarks = \"Failed\";\n dataEvent.Reason = (err as any).response\n ? (err as any).response.data.message\n : \"Something went wrong. Try again\";\n mixpanelInstance.setMetadata(metadata);\n emit(event.RegenerateSecretApplication, dataEvent);\n this.handleError(err);\n } finally {\n this.isRegeneratedApplication = false;\n }\n },\n\n async copyToClipboard(text: string | any) {\n await navigator.clipboard.writeText(text);\n },\n\n handleError(err: Error | any) {\n this.$store.dispatch(SHOW_TOAST, {\n message: err.message,\n type: ToastType.ERROR,\n });\n },\n },\n});\n","import { render } from \"./Credentials.vue?vue&type=template&id=8527b28e&scoped=true&ts=true\"\nimport script from \"./Credentials.vue?vue&type=script&lang=ts\"\nexport * from \"./Credentials.vue?vue&type=script&lang=ts\"\n\nimport \"./Credentials.vue?vue&type=style&index=0&id=8527b28e&lang=scss&scoped=true\"\n\nimport exportComponent from \"/frontend/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-8527b28e\"]])\n\nexport default __exports__","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Credentials.vue?vue&type=style&index=0&id=8527b28e&lang=scss&scoped=true\""],"sourceRoot":""}