@dialpad/dialtone-vue
Version:
Vue component library for Dialpad's design system Dialtone
89 lines (88 loc) • 3.85 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue2 = require("@dialpad/dialtone-icons/vue2");
const general_row_constants = require("./general_row_constants.cjs");
const _pluginVue2_normalizer = require("../../../_virtual/_plugin-vue2_normalizer.cjs");
const typeToIcon = /* @__PURE__ */ new Map([
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.INBOX, vue2.DtIconInbox],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.CONTACTS, vue2.DtIconContacts],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.CHANNELS, vue2.DtIconHash],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.THREADS, vue2.DtIconThread],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.LAUNCHPAD, vue2.DtIconLayoutTemplate],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.LOCKED_CHANNEL, vue2.DtIconLock],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.QUICK_START, vue2.DtIconSparkle],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.COACHING_GROUP, vue2.DtIconUsers],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.COACHING_CENTER, vue2.DtIconExternalLink],
["locked channel unread", vue2.DtIconLockFilled],
["channel unread", vue2.DtIconHashBold],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.ASSIGNED, vue2.DtIconAtSign],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.DIGITAL, vue2.DtIconLaptop2],
[general_row_constants.LEFTBAR_GENERAL_ROW_TYPES.SCHEDULED, vue2.DtIconCalendarClock]
]);
const _sfc_main = {
name: "DtRecipeLeftbarGeneralRowIcon",
components: {
DtIconDialbot: vue2.DtIconDialbot,
DtIconInbox: vue2.DtIconInbox,
DtIconContacts: vue2.DtIconContacts,
DtIconHash: vue2.DtIconHash,
DtIconThread: vue2.DtIconThread,
DtIconLayoutTemplate: vue2.DtIconLayoutTemplate,
DtIconLock: vue2.DtIconLock,
DtIconSparkle: vue2.DtIconSparkle,
DtIconUsers: vue2.DtIconUsers,
DtIconExternalLink: vue2.DtIconExternalLink,
DtIconLockFilled: vue2.DtIconLockFilled,
DtIconHashBold: vue2.DtIconHashBold,
DtIconAtSign: vue2.DtIconAtSign,
DtIconLaptop2: vue2.DtIconLaptop2,
DtIconCalendarClock: vue2.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]
];
}
}
};
var _sfc_render = function render() {
var _vm = this, _c = _vm._self._c;
return _vm.isIconType ? _c(_vm.getIconName, { tag: "component", attrs: { "size": _vm.iconSize } }) : _vm.isContactCenterType ? _c("div", { class: _vm.contactCenterIconClasses }) : _vm.isDialbotType ? _c("div", { staticClass: "d-recipe-leftbar-general-row__icon", attrs: { "data-qa": "general-row-dialbot" } }, [_c("dt-icon-dialbot", { attrs: { "size": "500" } })], 1) : _vm._e();
};
var _sfc_staticRenderFns = [];
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.default(
_sfc_main,
_sfc_render,
_sfc_staticRenderFns
);
const DtRecipeLeftbarGeneralRowIcon = __component__.exports;
exports.default = DtRecipeLeftbarGeneralRowIcon;
//# sourceMappingURL=leftbar_general_row_icon.vue.cjs.map