"use client"; import { useState } from "react"; import { Copy } from "lucide-react"; import { Button } from "@/app/_components/GlobalComponents/UIElements/Button"; import { Modal } from "@/app/_components/GlobalComponents/UIElements/Modal"; import { Input } from "@/app/_components/GlobalComponents/FormElements/Input"; import { type CronJob } from "@/app/_utils/cronjob-utils"; interface CloneTaskModalProps { cronJob: CronJob | null; isOpen: boolean; onClose: () => void; onConfirm: (newComment: string) => void; isCloning: boolean; } export const CloneTaskModal = ({ cronJob, isOpen, onClose, onConfirm, isCloning, }: CloneTaskModalProps) => { const [newComment, setNewComment] = useState(""); if (!isOpen || !cronJob) return null; const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); if (newComment.trim()) { onConfirm(newComment.trim()); } }; return (

{cronJob.comment}

Schedule: {cronJob.schedule}

Command: {cronJob.command}

setNewComment(e.target.value)} disabled={isCloning} className="w-full" autoFocus />
); }