/*!
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 i,openBlock as t,createElementBlock as e,normalizeClass as o,createElementVNode as c}from"vue";import{subscriptIcon as r,superscriptIcon as n,underlineIcon as s,codeIcon as d,strikeIcon as l,italicIcon as a,boldIcon as u}from"./icons.js";import{FONT_SETTINGS as p}from"../constant/index.js";import './MarkButton.css';/* empty css               */import v from"../../../_virtual/_plugin-vue_export-helper.js";const m=["disabled","title"],g=["innerHTML"],b=/* @__PURE__ */v({__name:"MarkButton",props:{type:{type:String,required:!0,validator:i=>p.includes(i)},editor:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},setup(p){const v=p,b={bold:{title:"Bold",icon:u,command:()=>v.editor?.chain().focus().toggleBold().run(),isActive:()=>v.editor?.isActive("bold")},italic:{title:"Italic",icon:a,command:()=>v.editor?.chain().focus().toggleItalic().run(),isActive:()=>v.editor?.isActive("italic")},strike:{title:"Strikethrough",icon:l,command:()=>v.editor?.chain().focus().toggleStrike().run(),isActive:()=>v.editor?.isActive("strike")},code:{title:"Code",icon:d,command:()=>v.editor?.chain().focus().toggleCode().run(),isActive:()=>v.editor?.isActive("code")},underline:{title:"Underline",icon:s,command:()=>v.editor?.chain().focus().toggleUnderline().run(),isActive:()=>v.editor?.isActive("underline")},superscript:{title:"Superscript",icon:n,command:()=>v.editor?.chain().focus().toggleSuperscript().run(),isActive:()=>v.editor?.isActive("superscript")},subscript:{title:"Subscript",icon:r,command:()=>v.editor?.chain().focus().toggleSubscript().run(),isActive:()=>v.editor?.isActive("subscript")}},A=i(()=>b[v.type]),f=i(()=>A.value.title),h=i(()=>A.value.icon),k=i(()=>A.value.isActive()),S=()=>{A.value.command()};return(i,r)=>(t(),e("button",{class:o(["tiptap-button",{"is-active":k.value,"is-disabled":p.disabled}]),disabled:p.disabled,title:f.value,onClick:S},[c("span",{innerHTML:h.value},null,8,g)],10,m))}},[["__scopeId","data-v-a6375281"]]);export{b as default};