/*!
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{ref as e,openBlock as t,createElementBlock as i,Fragment as o,createElementVNode as l,normalizeClass as a,createVNode as d}from"vue";import s from"./basic/MediaUploadModal.vue.js";import './VideoUploadButton.css';/* empty css                      */import n from"../../../_virtual/_plugin-vue_export-helper.js";const r=["disabled"],u=/* @__PURE__ */n({__name:"VideoUploadButton",props:{editor:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},setup(n){const u=n,p=e(!1),c=()=>{p.value=!0},v=()=>{p.value=!1},b=()=>{p.value=!1},m=e=>{const[t]=e.target.files||[];t&&((e,t)=>{const i=new FileReader;i.onload=e=>{t(e.target?.result||"")},i.readAsDataURL(e)})(t,e=>{(e=>{u.editor?.chain().focus().setVideo({src:e,controls:!0}).run()})(e)}),e.target.value=""};return(e,f)=>(t(),i(o,null,[l("button",{title:"Video",class:a([n.disabled?"is-disabled":""]),disabled:n.disabled,onClick:c},[...f[1]||(f[1]=[l("span",{class:"icon i-ant-design:video-camera-outlined",style:{width:"18px",height:"18px"}},null,-1)])],10,r),l("input",{type:"file",accept:"video/*",class:"hidden",onChange:m},null,32),d(s,{visible:p.value,"onUpdate:visible":f[0]||(f[0]=e=>p.value=e),title:"Add Video","media-type":"video",editor:u.editor,onCancel:v,onOk:b},null,8,["visible","editor"])],64))}},[["__scopeId","data-v-7e3247f9"]]);export{u as default};