/*!
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('./TableButton.css');const e=require("vue"),t=require("./basic/SelectMenu.vue.js"),o=require("./icons.js");;/* empty css                  */const n=require("../../../_virtual/_plugin-vue_export-helper.js"),l={class:"flex items-center gap-2"},a=["innerHTML"],c={key:0,class:"h-0.2 w-full bg-gray-400"},d={key:1,class:"flex items-center gap-2 w-full"},i=["innerHTML"],r={__name:"TableButton",props:{editor:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},setup(n){const r=n,u=o.tableIcon,m=e.computed(()=>[{name:"insertTable",title:"Insert Table",icon:o.insertTableIcon,command:()=>r.editor?.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),isActive:()=>!1,canExecute:()=>!0},{name:"addRowBefore",title:"Add Row Before",icon:o.addRowIcon,command:()=>r.editor?.chain().focus().addRowBefore().run(),isActive:()=>!1,canExecute:()=>r.editor?.can().addRowBefore()},{name:"addRowAfter",title:"Add Row After",icon:o.addRowIcon,command:()=>r.editor?.chain().focus().addRowAfter().run(),isActive:()=>!1,canExecute:()=>r.editor?.can().addRowAfter()},{name:"deleteRow",title:"Delete Row",icon:o.deleteRowIcon,command:()=>r.editor?.chain().focus().deleteRow().run(),isActive:()=>!1,canExecute:()=>r.editor?.can().deleteRow()},{name:"addColumnBefore",title:"Add Column Before",icon:o.addRowIcon,command:()=>r.editor?.chain().focus().addColumnBefore().run(),isActive:()=>!1,canExecute:()=>r.editor?.can().addColumnBefore()},{name:"addColumnAfter",title:"Add Column After",icon:o.addRowIcon,command:()=>r.editor?.chain().focus().addColumnAfter().run(),isActive:()=>!1,canExecute:()=>r.editor?.can().addColumnAfter()},{name:"deleteColumn",title:"Delete Column",icon:o.deleteRowIcon,command:()=>r.editor?.chain().focus().deleteColumn().run(),isActive:()=>!1,canExecute:()=>r.editor?.can().deleteColumn()}]),s=e.computed(()=>[{name:"toggleHeaderRow",title:"Toggle Header Row",icon:o.toggleHeaderIcon,command:()=>r.editor?.chain().focus().toggleHeaderRow().run(),canExecute:()=>r.editor?.can().toggleHeaderRow()},{name:"toggleHeaderColumn",title:"Toggle Header Column",icon:o.toggleHeaderIcon,command:()=>r.editor?.chain().focus().toggleHeaderColumn().run(),canExecute:()=>r.editor?.can().toggleHeaderColumn()},{name:"toggleHeaderCell",title:"Toggle Header Cell",icon:o.toggleHeaderIcon,command:()=>r.editor?.chain().focus().toggleHeaderCell().run(),canExecute:()=>r.editor?.can().toggleHeaderCell()},{name:"mergeCells",title:"Merge Cells",icon:o.mergeCellsIcon,command:()=>r.editor?.chain().focus().mergeCells().run(),canExecute:()=>r.editor?.can().mergeCells()},{name:"splitCell",title:"Split Cell",icon:o.splitCellsIcon,command:()=>r.editor?.chain().focus().splitCell().run(),canExecute:()=>r.editor?.can().splitCell()},{name:"deleteTable",title:"Delete Table",icon:o.deleteTableIcon,command:()=>r.editor?.chain().focus().deleteTable().run(),canExecute:()=>r.editor?.can().deleteTable()}]),g=e.computed(()=>[...m.value,{type:"divider",name:"divider"},...s.value]),f=e=>{"divider"!==e.type&&e.command&&e.command()};return(o,r)=>(e.openBlock(),e.createBlock(t.default,{items:g.value,disabled:n.disabled,"min-width":180,"trigger-width":100,onSelect:f},{trigger:e.withCtx(()=>[e.createElementVNode("div",l,[e.createElementVNode("span",{innerHTML:e.unref(u)},null,8,a),r[0]||(r[0]=e.createElementVNode("span",null,"Table",-1))])]),option:e.withCtx(({item:t})=>["divider"===t.type?(e.openBlock(),e.createElementBlock("div",c)):(e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("span",{innerHTML:t.icon},null,8,i),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]))]),_:1},8,["items","disabled"]))}},u=n.default(r,[["__scopeId","data-v-694ec0f6"]]);exports.default=u;