import { type FormEvent } from "react"; import Icon from "../../components/common/Icon"; import type { ScriptItem, Visibility } from "../../services/api"; import { scriptIcon } from "../../features/platform/WorkspaceTree"; type PublishModalProps = { publishTarget: ScriptItem | null; releaseNote: string; publishVisibility: Visibility; publishing: boolean; onReleaseNoteChange: (note: string) => void; onPublishVisibilityChange: (visibility: Visibility) => void; onSubmit: (event: FormEvent) => void; onClose: () => void; }; export function PublishModal({ publishTarget, releaseNote, publishVisibility, publishing, onReleaseNoteChange, onPublishVisibilityChange, onSubmit, onClose, }: PublishModalProps) { if (!publishTarget) return null; return (