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