UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

98 lines (97 loc) 4.18 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const vue3 = require("@dialpad/dialtone-icons/vue3"); const general_row_constants = require("./general_row_constants.cjs"); const vue = require("vue"); const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs"); const typeToIcon = /* @__PURE__ */ new Map([ [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.INBOX, vue3.DtIconInbox], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.CONTACTS, vue3.DtIconContacts], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.CHANNELS, vue3.DtIconHash], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.THREADS, vue3.DtIconThread], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.LAUNCHPAD, vue3.DtIconLayoutTemplate], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.LOCKED_CHANNEL, vue3.DtIconLock], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.QUICK_START, vue3.DtIconSparkle], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.COACHING_GROUP, vue3.DtIconUsers], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.COACHING_CENTER, vue3.DtIconExternalLink], ["locked channel unread", vue3.DtIconLockFilled], ["channel unread", vue3.DtIconHashBold], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.ASSIGNED, vue3.DtIconAtSign], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.DIGITAL, vue3.DtIconLaptop2], [general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.SCHEDULED, vue3.DtIconCalendarClock] ]); const _sfc_main = { compatConfig: { MODE: 3 }, name: "DtRecipeLeftbarGeneralRowIcon", components: { DtIconDialbot: vue3.DtIconDialbot, DtIconInbox: vue3.DtIconInbox, DtIconContacts: vue3.DtIconContacts, DtIconHash: vue3.DtIconHash, DtIconThread: vue3.DtIconThread, DtIconLayoutTemplate: vue3.DtIconLayoutTemplate, DtIconLock: vue3.DtIconLock, DtIconSparkle: vue3.DtIconSparkle, DtIconUsers: vue3.DtIconUsers, DtIconExternalLink: vue3.DtIconExternalLink, DtIconLockFilled: vue3.DtIconLockFilled, DtIconHashBold: vue3.DtIconHashBold, DtIconAtSign: vue3.DtIconAtSign, DtIconLaptop2: vue3.DtIconLaptop2, DtIconCalendarClock: vue3.DtIconCalendarClock }, props: { type: { type: String, default: null }, color: { type: String, default: null }, iconSize: { type: String, default: "300" } }, computed: { isIconType() { return ![general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.DIALBOT, general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.CONTACT_CENTER].includes(this.type); }, isContactCenterType() { return this.type === general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.CONTACT_CENTER; }, isDialbotType() { return this.type === general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.DIALBOT; }, getIconName() { return typeToIcon.get(this.type); }, contactCenterIconClasses() { return [ "d-recipe-leftbar-row__icon-cc", general_row_constants.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS[this.color] ]; } } }; const _hoisted_1 = { key: 2, class: "d-recipe-leftbar-general-row__icon", "data-qa": "general-row-dialbot" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_dt_icon_dialbot = vue.resolveComponent("dt-icon-dialbot"); return $options.isIconType ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($options.getIconName), { key: 0, size: $props.iconSize }, null, 8, ["size"])) : $options.isContactCenterType ? (vue.openBlock(), vue.createElementBlock("div", { key: 1, class: vue.normalizeClass($options.contactCenterIconClasses) }, null, 2)) : $options.isDialbotType ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createVNode(_component_dt_icon_dialbot, { size: "500" }) ])) : vue.createCommentVNode("", true); } const DtRecipeLeftbarGeneralRowIcon = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]); exports.default = DtRecipeLeftbarGeneralRowIcon; //# sourceMappingURL=leftbar_general_row_icon.vue.cjs.map