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(`../../common/emoji/index.cjs`),n=require(`../../localization/index.cjs`),r=require(`../button/button.cjs`),i=require(`../tooltip/tooltip.cjs`),a=require(`../emoji/emoji.cjs`),o=require(`../emoji-text-wrapper/emoji-text-wrapper.cjs`),s=require(`./emoji-row-constants.cjs`);let c=require(`vue`);var l={compatConfig:{MODE:3},name:`DtRecipeEmojiRow`,components:{DtTooltip:i.default,DtButton:r.default,DtEmoji:a.default,DtEmojiTextWrapper:o.default},props:{reactions:{type:Array,default:()=>[],validator:e=>{for(let t of e)if(!s.REACTIONS_ATTRIBUTES.every(e=>t[e]!==void 0))return!1;return!0}}},emits:[`emoji-clicked`,`emoji-hovered`],data(){return{i18n:new n.DialtoneLocalization}},methods:{emojiClicked(e){this.$emit(`emoji-clicked`,e.emojiUnicodeOrShortname)},emojiHovered(e,t){this.$emit(`emoji-hovered`,{reaction:e.emojiUnicodeOrShortname,state:t})},reactionLabel(e){return this.i18n.$t(`DIALTONE_EMOJI_ROW_REACTION_LABEL`,{reaction:t.getEmojiShortCode(e.emojiUnicodeOrShortname),personCount:e.num})}}},u={class:`d-recipe-emoji-row`},d={"aria-hidden":`true`},f={class:`d-recipe-emoji-row__tooltip-emoji`},p={class:`d-recipe-emoji-row__tooltip-names`},m=[`textContent`],h={class:`d-recipe-emoji-row__emoji`},g={class:`d-recipe-emoji-row__reaction-number`};function _(e,t,n,r,i,a){let o=(0,c.resolveComponent)(`dt-emoji-text-wrapper`),s=(0,c.resolveComponent)(`dt-emoji`),l=(0,c.resolveComponent)(`dt-button`),_=(0,c.resolveComponent)(`dt-tooltip`);return(0,c.openBlock)(),(0,c.createElementBlock)(`span`,u,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(n.reactions,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{key:e.unicodeOutput},[(0,c.createVNode)(_,{class:`d-recipe-emoji-row__tooltip`,"content-class":`d-recipe-emoji-row__tooltip-content`,"fallback-placements":[`top`,`bottom`],sticky:`popper`,onShown:t=>a.emojiHovered(e,t)},{anchor:(0,c.withCtx)(({attrs:t})=>[(0,c.createVNode)(l,{importance:`clear`,size:`sm`,"data-qa":`feed-item-reaction-button`,class:(0,c.normalizeClass)([`d-recipe-emoji-row__reaction`,e.isSelected?`d-recipe-emoji-row__reaction--selected`:``]),"aria-label":a.reactionLabel(e),attrs:t,onClick:t=>a.emojiClicked(e)},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`span`,h,[(0,c.createVNode)(s,{class:`d-recipe-emoji-row__emoji`,size:`200`,"img-class":`d-recipe-emoji-row__emoji-img`,code:e.emojiUnicodeOrShortname},null,8,[`code`])]),(0,c.createElementVNode)(`span`,g,(0,c.toDisplayString)(e.num),1)]),_:2},1032,[`class`,`aria-label`,`attrs`,`onClick`])]),default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`span`,d,[(0,c.createVNode)(o,{size:`800`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`p`,f,(0,c.toDisplayString)(e.emojiUnicodeOrShortname),1),t[0]||(t[0]=(0,c.createElementVNode)(`br`,null,null,-1)),(0,c.createElementVNode)(`p`,p,[(0,c.createTextVNode)((0,c.toDisplayString)(e.names)+` `,1),(0,c.createElementVNode)(`span`,{class:`d-recipe-emoji-row__tooltip-label`,textContent:(0,c.toDisplayString)(a.reactionLabel(e))},null,8,m)])]),_:2},1024)])]),_:2},1032,[`onShown`])]))),128)),(0,c.renderSlot)(e.$slots,`picker`)])}var v=e.t(l,[[`render`,_]]);exports.default=v;
//# sourceMappingURL=emoji-row.cjs.map