Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`../../localization/index.cjs`),n=require(`../collapsible/collapsible.cjs`),r=require(`../item-layout/item-layout.cjs`),i=require(`./feed-item-pill-constants.cjs`);let a=require(`vue`),o=require(`@dialpad/dialtone-icons/vue3`);var s={compatConfig:{MODE:3},name:`DtRecipeFeedItemPill`,components:{DtItemLayout:r.default,DtCollapsible:n.default},props:{title:{type:String,default:()=>``},wrapperClass:{type:[String,Array,Object],default:``},buttonClass:{type:[String,Array,Object],default:``},toggleable:{type:Boolean,default:()=>!0},defaultToggled:{type:Boolean,default:()=>!1},borderColor:{type:String,default:`default`,validator:e=>Object.keys(i.FEED_ITEM_PILL_BORDER_COLORS).includes(e)}},data(){return{hover:!1,expanded:this.defaultToggled,i18n:new t.DialtoneLocalization}},computed:{toggleIcon(){return this.expanded?o.DtIconChevronDown:o.DtIconChevronRight},showChevronIcon(){return this.toggleable&&this.hover},toggleableClass(){return this.toggleable?`d-recipe-feed-item-pill--toggleable`:``},borderClass(){return i.FEED_ITEM_PILL_BORDER_COLORS[this.borderColor]},anchorTitle(){return this.i18n.$t(`DIALTONE_FEED_ITEM_PILL_ARIA_LABEL`)}},methods:{onClick(){this.toggleable&&(this.expanded=!this.expanded)}}},c={class:`d-recipe-feed-item-pill__wrapper`},l=[`aria-label`,`title`],u={class:`d-recipe-feed-item-pill__title`},d={class:`d-recipe-feed-item-pill__icon`,"data-qa":`dt-recipe-feed-item-pill__icon`},f={class:`d-recipe-feed-item-pill__subtitle`},p={class:`d-recipe-feed-item-pill__bottom`},m={class:`d-recipe-feed-item-pill__right`},h={class:`d-recipe-feed-item-pill__content`};function g(e,t,n,r,i,o){let s=(0,a.resolveComponent)(`dt-item-layout`),g=(0,a.resolveComponent)(`dt-collapsible`);return(0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:(0,a.normalizeClass)([`d-recipe-feed-item-pill__border`,o.borderClass,n.wrapperClass])},[(0,a.createElementVNode)(`div`,c,[(0,a.createVNode)(g,{open:i.expanded},(0,a.createSlots)({anchor:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`button`,{"data-qa":`dt-recipe-feed-item-pill`,class:(0,a.normalizeClass)([`d-recipe-feed-item-pill__button`,o.toggleableClass,n.buttonClass]),"aria-label":o.anchorTitle,title:o.anchorTitle,onFocusin:t[0]||(t[0]=e=>i.hover=!0),onFocusout:t[1]||(t[1]=e=>i.hover=!1),onMouseenter:t[2]||(t[2]=e=>i.hover=!0),onMouseleave:t[3]||(t[3]=e=>i.hover=!1),onClick:t[4]||(t[4]=(...e)=>o.onClick&&o.onClick(...e))},[(0,a.createVNode)(s,{class:`d-recipe-feed-item-pill__layout`,unstyled:``},(0,a.createSlots)({left:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,d,[o.showChevronIcon?((0,a.openBlock)(),(0,a.createBlock)((0,a.resolveDynamicComponent)(o.toggleIcon),{key:0,size:`300`})):(0,a.renderSlot)(e.$slots,`leftIcon`,{key:1,iconSize:`300`})])]),default:(0,a.withCtx)(()=>[(0,a.renderSlot)(e.$slots,`title`,{},()=>[(0,a.createElementVNode)(`span`,u,(0,a.toDisplayString)(n.title),1)])]),_:2},[e.$slots.subtitle?{name:`subtitle`,fn:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,f,[(0,a.renderSlot)(e.$slots,`subtitle`)])]),key:`0`}:void 0,e.$slots.bottom?{name:`bottom`,fn:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,p,[(0,a.renderSlot)(e.$slots,`bottom`)])]),key:`1`}:void 0,e.$slots.right?{name:`right`,fn:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,m,[(0,a.renderSlot)(e.$slots,`right`)])]),key:`2`}:void 0]),1024)],42,l)]),_:2},[e.$slots.content?{name:`content`,fn:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,h,[(0,a.renderSlot)(e.$slots,`content`)])]),key:`0`}:void 0]),1032,[`open`])])],2)}var _=e.t(s,[[`render`,g]]);exports.default=_;
//# sourceMappingURL=feed-item-pill.cjs.map