/*!
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 i,withCtx as s,createElementVNode as o,toDisplayString as r}from"vue";import l from"./basic/SelectMenu.vue.js";import{taskListIcon as n,orderedListIcon as a,bulletListIcon as d}from"./icons.js";import{LIST_TYPES as c}from"../constant/index.js";import './ListDropdownMenu.css';/* empty css                     */import u from"../../../_virtual/_plugin-vue_export-helper.js";const p={class:"flex items-center gap-2"},m=["innerHTML"],v=/* @__PURE__ */u({__name:"ListDropdownMenu",props:{types:{type:Array,default:()=>c,validator:e=>e.every(e=>c.includes(e))},editor:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},setup(c){const u=c,v={bulletList:{title:"Bullet List",icon:d,command:()=>u.editor?.chain().focus().toggleBulletList().run(),isActive:()=>u.editor?.isActive("bulletList")},orderedList:{title:"Ordered List",icon:a,command:()=>u.editor?.chain().focus().toggleOrderedList().run(),isActive:()=>u.editor?.isActive("orderedList")},taskList:{title:"Task List",icon:n,command:()=>u.editor?.chain().focus().toggleTaskList().run(),isActive:()=>u.editor?.isActive("taskList")}},L=e(()=>u.types.map(e=>({name:e,...v[e]}))),f=e(()=>{const e=L.value.find(e=>e.isActive?.());return e?e.title:"Bullet List"}),b=e=>{e?.command?.()};return(e,n)=>(t(),i(l,{items:L.value,disabled:c.disabled,"selected-label":f.value,onSelect:b},{option:s(({item:e})=>[o("span",p,[o("span",{innerHTML:e.icon},null,8,m),o("span",null,r(e.title),1)])]),_:1},8,["items","disabled","selected-label"]))}},[["__scopeId","data-v-3fbb28bf"]]);export{v as default};