{"version":3,"file":"unread-pill.cjs","sources":["../../../recipes/leftbar/unread_pill/unread_pill.vue"],"sourcesContent":["<template>\n  <button\n    :class=\"['d-recipe-leftbar-unread-pill', `d-recipe-leftbar-unread-pill-${kind}`]\"\n    type=\"button\"\n    data-qa=\"dt-recipe-leftbar-unread-pill\"\n    v-on=\"unreadChipListeners\"\n  >\n    <dt-icon-arrow-up\n      v-if=\"direction === 'up'\"\n      size=\"300\"\n    />\n    <dt-icon-arrow-down\n      v-else\n      size=\"300\"\n    />\n    <span data-qa=\"dt-recipe-leftbar-unread-pill__label\">\n      <slot>\n        {{ text }}\n      </slot>\n    </span>\n  </button>\n</template>\n\n<script>\nimport { DtIconArrowUp, DtIconArrowDown } from '@dialpad/dialtone-icons/vue3';\nimport { UNREAD_PILL_DIRECTIONS, UNREAD_PILL_KINDS } from './unread_pill_constants';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'DtRecipeUnreadPill',\n\n  components: {\n    DtIconArrowUp,\n    DtIconArrowDown,\n  },\n\n  props: {\n    /**\n     * The kind of unread pill which determines the styling\n     * @values 'mentions', 'messages'\n     **/\n    kind: {\n      type: String,\n      required: true,\n      validator: (kind) => UNREAD_PILL_KINDS.includes(kind),\n    },\n\n    /**\n     * The direction of the arrow icon\n     * @values 'up', 'down'\n     **/\n    direction: {\n      type: String,\n      required: true,\n      validator: (dir) => UNREAD_PILL_DIRECTIONS.includes(dir),\n    },\n  },\n\n  emits: [\n    /**\n     * Native click event\n     *\n     * @event click\n     * @type {PointerEvent | KeyboardEvent}\n     */\n    'click',\n  ],\n\n  data () {\n    return {\n      i18n: new DialtoneLocalization(),\n    };\n  },\n\n  computed: {\n    text () {\n      return this.kind === 'mentions'\n        ? this.i18n.$t('DIALTONE_UNREAD_PILL_MENTIONS_TEXT')\n        : this.i18n.$t('DIALTONE_UNREAD_PILL_MESSAGES_TEXT');\n    },\n\n    unreadChipListeners () {\n      return {\n        click: event => this.$emit('click', event),\n      };\n    },\n  },\n};\n</script>\n"],"names":["_sfc_main","DtIconArrowUp","DtIconArrowDown","kind","UNREAD_PILL_KINDS","dir","UNREAD_PILL_DIRECTIONS","DialtoneLocalization","event","_hoisted_1","_openBlock","_createElementBlock","_mergeProps","$props","_toHandlers","$options","_createBlock","_component_dt_icon_arrow_up","_component_dt_icon_arrow_down","_createElementVNode","_renderSlot","_ctx","_createTextVNode","_toDisplayString"],"mappings":"0TA4BKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,qBAEN,WAAY,eACVC,EAAAA,cACA,gBAAAC,EAAAA,iBAGF,MAAO,CAKL,KAAM,CACJ,KAAM,OACN,SAAU,GACV,UAAYC,GAASC,oBAAkB,SAASD,CAAI,GAOtD,UAAW,CACT,KAAM,OACN,SAAU,GACV,UAAYE,GAAQC,yBAAuB,SAASD,CAAG,IAI3D,MAAO,CAOL,SAGF,MAAQ,CACN,MAAO,CACL,KAAM,IAAIE,EAAAA,qBAEd,EAEA,SAAU,CACR,MAAQ,CACN,OAAO,KAAK,OAAS,WACjB,KAAK,KAAK,GAAG,oCAAoC,EACjD,KAAK,KAAK,GAAG,oCAAoC,CACvD,EAEA,qBAAuB,CACrB,MAAO,CACL,MAAOC,GAAS,KAAK,MAAM,QAASA,CAAK,EAE7C,EAEJ,EAzEUC,EAAA,CAAA,UAAQ,sCAAsC,oHAdtD,OAAAC,YAAA,EAAAC,qBAmBS,SAnBTC,EAAAA,WAmBS,CAlBN,sEAAwEC,EAAA,IAAI,EAAA,EAC7E,KAAK,SACL,UAAQ,+BACR,EAAAC,EAAAA,WAA0BC,EAApB,oBAAmB,EAAA,CAAA,EAAA,CAGjBF,EAAA,YAAS,oBADjBG,EAAAA,YAGEC,EAAA,CAVN,IAAA,EASM,KAAK,wBAEPD,EAAAA,YAGEE,EAAA,CAdN,IAAA,EAaM,KAAK,SAEPC,EAAAA,mBAIO,OAJPV,EAIO,CAHLW,EAAAA,WAEOC,sBAFP,IAEO,CAlBbC,EAAAA,gBAAAC,EAAAA,gBAiBWR,EAAA,IAAI,EAAA,CAAA"}