/*!
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('./UndoRedoButton.css');const e=require("vue");;/* empty css                     */const o=require("../../../_virtual/_plugin-vue_export-helper.js"),i=["disabled","title"],t={__name:"UndoRedoButton",props:{action:{type:String,required:!0,validator:e=>["undo","redo"].includes(e)},editor:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},setup(o){const t=o,d=e.computed(()=>"undo"===t.action?{title:"Undo",icon:"i-simple-line-icons:action-undo",command:()=>t.editor?.chain().focus().undo().run(),isDisabled:()=>!t.editor?.can().undo()}:{title:"Redo",icon:"i-simple-line-icons:action-redo",command:()=>t.editor?.chain().focus().redo().run(),isDisabled:()=>!t.editor?.can().redo()}),l=e.computed(()=>d.value.title),a=e.computed(()=>d.value.icon),n=e.computed(()=>d.value.isDisabled()),u=()=>{d.value.command()};return(t,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass({"is-disabled":o.disabled||n.value}),disabled:o.disabled||n.value,title:l.value,onClick:u},[e.createElementVNode("span",{class:e.normalizeClass(["icon",a.value])},null,2)],10,i))}},d=o.default(t,[["__scopeId","data-v-a3ff8191"]]);exports.default=d;