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