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