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,UAAA,IAAI,EAAJ;AAAF,SAAxB,CAAX,EAAb,KACK,KAAK,CAAC,IAAN,CAAW,KAAK,cAAL,CAAoB,kBAApB,EAAsC;AAAE,UAAA,GAAG,EAAE,IAAI,CAAC,IAAL,CAAU,GAAV,CAAP;AAAuB,UAAA,KAAK,EAAE;AAA9B,SAAtC,EAA4E,CAAC,IAAI,CAAC,IAAN,CAA5E,CAAX;AAEL,YAAI,CAAC,GAAG,KAAK,KAAL,CAAW,MAAX,GAAoB,CAA5B,EAA+B,KAAK,CAAC,IAAN,CAAW,KAAK,UAAL,EAAX;AAChC;;AAED,aAAO,KAAP;AACD;AArBM,GAxBF;AAgDP,EAAA,MAhDO,kBAgDC,CAhDD,EAgDE;AACP,QAAM,QAAQ,GAAG,KAAK,MAAL,CAAY,OAAZ,IAAuB,KAAK,QAAL,EAAxC;AAEA,WAAO,CAAC,CAAC,IAAD,EAAO;AACb,MAAA,WAAW,EAAE,eADA;AAEb,MAAA,KAAK,EAAE,KAAK;AAFC,KAAP,EAGL,QAHK,CAAR;AAID;AAvDM,CAHM,C","sourcesContent":["// Styles\nimport './VBreadcrumbs.sass'\n\n// Types\nimport { VNode } from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\n// Components\nimport { VBreadcrumbsDivider, VBreadcrumbsItem } from '.'\n\n// Mixins\nimport Themeable from '../../mixins/themeable'\n\n// Utils\nimport mixins from '../../util/mixins'\n\nexport default mixins(\n Themeable\n /* @vue/component */\n).extend({\n name: 'v-breadcrumbs',\n\n props: {\n divider: {\n type: String,\n default: '/',\n },\n items: {\n type: Array,\n default: () => ([]),\n } as PropValidator<any[]>,\n large: Boolean,\n },\n\n computed: {\n classes (): object {\n return {\n 'v-breadcrumbs--large': this.large,\n ...this.themeClasses,\n }\n },\n },\n\n methods: {\n genDivider () {\n return this.$createElement(VBreadcrumbsDivider, this.$slots.divider ? this.$slots.divider : this.divider)\n },\n genItems () {\n const items = []\n const hasSlot = !!this.$scopedSlots.item\n const keys = []\n\n for (let i = 0; i < this.items.length; i++) {\n const item = this.items[i]\n\n keys.push(item.text)\n\n if (hasSlot) items.push(this.$scopedSlots.item!({ item }))\n else items.push(this.$createElement(VBreadcrumbsItem, { key: keys.join('.'), props: item }, [item.text]))\n\n if (i < this.items.length - 1) items.push(this.genDivider())\n }\n\n return items\n },\n },\n\n render (h): VNode {\n const children = this.$slots.default || this.genItems()\n\n return h('ul', {\n staticClass: 'v-breadcrumbs',\n class: this.classes,\n }, children)\n },\n})\n"],"sourceRoot":"","file":"VBreadcrumbs.js"} |