/*!
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{Node as t}from"../../../node_modules/@tiptap/core/dist/index.js";const e=t.create({name:"video",group:"block",atom:!0,addAttributes:()=>({src:{default:null},width:{default:null},height:{default:null},controls:{default:!0},autoplay:{default:!1},loop:{default:!1},muted:{default:!1}}),parseHTML:()=>[{tag:"video"},{tag:'iframe[src*="youtube"]',getAttrs:t=>({src:t.getAttribute("src")})},{tag:'iframe[src*="vimeo"]',getAttrs:t=>({src:t.getAttribute("src")})}],renderHTML({HTMLAttributes:t}){const{src:e}=t;return e&&(e.includes("youtube")||e.includes("vimeo"))?["div",{class:"video-wrapper"},["iframe",t]]:["div",{class:"video-wrapper"},["video",t]]},addCommands(){return{setVideo:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}}});export{e as Video};