/*!
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
*/
import{computed as e,openBlock as t,createBlock as a,withCtx as i,createElementVNode as n,toDisplayString as r}from"vue";import l from"./basic/SelectMenu.vue.js";import{HEADING_SIZES as o}from"../constant/index.js";import './HeadingDropdownMenu.css';/* empty css                        */import s from"../../../_virtual/_plugin-vue_export-helper.js";const d=["innerHTML"],p=/* @__PURE__ */s({__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(s){const p=s,u=e(()=>[...p.levels.map(e=>({name:`h${e}`,title:`Heading ${e}`,command:()=>{p.editor?.chain().focus().toggleHeading({level:e}).setFontSize(o[e]).run()},isActive:()=>p.editor?.isActive("heading",{level:e})})),{name:"paragraph",title:"Paragraph",command:()=>{p.editor?.chain().focus().setParagraph().unsetFontSize().run()},isActive:()=>p.editor?.isActive("paragraph")}]),c=e(()=>{const e=u.value.find(e=>e.isActive?.());return e?e.title:"Paragraph"}),m=e=>{e?.command?.()};return(e,o)=>(t(),a(l,{items:u.value,disabled:s.disabled,"selected-label":c.value,onSelect:m},{option:i(({item:e})=>[n("span",{innerHTML:e.icon},null,8,d),n("span",null,r(e.title),1)]),_:1},8,["items","disabled","selected-label"]))}},[["__scopeId","data-v-39be6c62"]]);export{p as default};