"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./feed-item-pill-constants.cjs"),r=require("@dialpad/dialtone-icons/vue2"),n=require("../../localization/index.cjs"),s=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),a=require("../collapsible/collapsible.cjs"),u=require("../item-layout/item-layout.cjs"),c={name:"DtRecipeFeedItemPill",components:{DtItemLayout:u.default,DtCollapsible:a.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:i=>Object.keys(o.FEED_ITEM_PILL_BORDER_COLORS).includes(i)}},data(){return{hover:!1,expanded:this.defaultToggled,i18n:new n.DialtoneLocalization}},computed:{toggleIcon(){return this.expanded?r.DtIconChevronDown:r.DtIconChevronRight},showChevronIcon(){return this.toggleable&&this.hover},toggleableClass(){return this.toggleable?"d-recipe-feed-item-pill--toggleable":""},borderClass(){return o.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)}}};var d=function(){var e=this,t=e._self._c;return t("div",{class:["d-recipe-feed-item-pill__border",e.borderClass,e.wrapperClass]},[t("div",{staticClass:"d-recipe-feed-item-pill__wrapper"},[t("dt-collapsible",{attrs:{open:e.expanded},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("button",{class:["d-recipe-feed-item-pill__button",e.toggleableClass,e.buttonClass],attrs:{"data-qa":"dt-recipe-feed-item-pill","aria-label":e.anchorTitle,title:e.anchorTitle},on:{focusin:function(l){e.hover=!0},focusout:function(l){e.hover=!1},mouseenter:function(l){e.hover=!0},mouseleave:function(l){e.hover=!1},click:e.onClick}},[t("dt-item-layout",{staticClass:"d-recipe-feed-item-pill__layout",attrs:{unstyled:""},scopedSlots:e._u([{key:"left",fn:function(){return[t("div",{staticClass:"d-recipe-feed-item-pill__icon",attrs:{"data-qa":"dt-recipe-feed-item-pill__icon"}},[e.showChevronIcon?t(e.toggleIcon,{tag:"component",attrs:{size:"300"}}):e._t("leftIcon",null,{iconSize:"300"})],2)]},proxy:!0},e.$slots.subtitle?{key:"subtitle",fn:function(){return[t("div",{staticClass:"d-recipe-feed-item-pill__subtitle"},[e._t("subtitle")],2)]},proxy:!0}:null,e.$slots.bottom?{key:"bottom",fn:function(){return[t("div",{staticClass:"d-recipe-feed-item-pill__bottom"},[e._t("bottom")],2)]},proxy:!0}:null,e.$slots.right?{key:"right",fn:function(){return[t("div",{staticClass:"d-recipe-feed-item-pill__right"},[e._t("right")],2)]},proxy:!0}:null],null,!0)},[e._t("title",function(){return[t("span",{staticClass:"d-recipe-feed-item-pill__title"},[e._v(e._s(e.title))])]})],2)],1)]},proxy:!0},e.$slots.content?{key:"content",fn:function(){return[t("div",{staticClass:"d-recipe-feed-item-pill__content"},[e._t("content")],2)]},proxy:!0}:null],null,!0)})],1)])},_=[],p=s.n(c,d,_);const f=p.exports;exports.default=f;
//# sourceMappingURL=feed-item-pill.cjs.map
