/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./HeadingDropdownMenu.css');const e=require("vue"),t=require("./basic/SelectMenu.vue.js"),a=require("../constant/index.js");;/* empty css                          */const i=require("../../../_virtual/_plugin-vue_export-helper.js"),r=["innerHTML"],l={__name:"HeadingDropdownMenu",props:{levels:{type:Array,default:()=>[1,2,3],validator:e=>e.every(e=>[1,2,3,4,5,6].includes(e))},editor:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},setup(i){const l=i,n=e.computed(()=>[...l.levels.map(e=>({name:`h${e}`,title:`Heading ${e}`,command:()=>{l.editor?.chain().focus().toggleHeading({level:e}).setFontSize(a.HEADING_SIZES[e]).run()},isActive:()=>l.editor?.isActive("heading",{level:e})})),{name:"paragraph",title:"Paragraph",command:()=>{l.editor?.chain().focus().setParagraph().unsetFontSize().run()},isActive:()=>l.editor?.isActive("paragraph")}]),o=e.computed(()=>{const e=n.value.find(e=>e.isActive?.());return e?e.title:"Paragraph"}),d=e=>{e?.command?.()};return(a,l)=>(e.openBlock(),e.createBlock(t.default,{items:n.value,disabled:i.disabled,"selected-label":o.value,onSelect:d},{option:e.withCtx(({item:t})=>[e.createElementVNode("span",{innerHTML:t.icon},null,8,r),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),_:1},8,["items","disabled","selected-label"]))}},n=i.default(l,[["__scopeId","data-v-39be6c62"]]);exports.default=n;