/* Copyright (C) 2025 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. */ import React from 'react'; import { Input, Typography, Button, Switch } from '@douyinfe/semi-ui'; import { IconFile } from '@douyinfe/semi-icons'; import { Plus, X, Film } from 'lucide-react'; import { useTranslation } from 'react-i18next'; const VideoUrlInput = ({ videoUrls, videoEnabled, onVideoUrlsChange, onVideoEnabledChange, allowToggle = true, disabled = false, }) => { const { t } = useTranslation(); const handleAdd = () => { onVideoUrlsChange([...(videoUrls || []), '']); }; const handleUpdate = (index, value) => { const next = [...(videoUrls || [])]; next[index] = value; onVideoUrlsChange(next); }; const handleRemove = (index) => { onVideoUrlsChange((videoUrls || []).filter((_, i) => i !== index)); }; const enabled = videoEnabled !== false; const list = videoUrls || []; return (