import React from 'react'
import TagPicker from '../tags/TagPicker'
import Checkbox from '../../Components/ui/Checkbox'
import SchedulePublishPicker from './SchedulePublishPicker'
import UploadDescriptionEditor from './UploadDescriptionEditor'
export default function UploadSidebar({
title = 'Artwork details',
description = 'Complete metadata before publishing',
showHeader = true,
metadata,
suggestedTags = [],
errors = {},
publishMode,
scheduledAt,
timezone,
onPublishModeChange,
onScheduleAt,
onChangeTitle,
onChangeTags,
onChangeDescription,
onToggleRights,
}) {
return (
{showHeader && (
)}
Basics
Add a clear title and short description.
Title *
onChangeTitle?.(event.target.value)}
className={`mt-2 w-full rounded-xl border bg-white/10 px-3 py-2 text-sm text-white focus:outline-none focus:ring-2 ${errors.title ? 'border-red-300/60 focus:ring-red-300/70' : 'border-white/15 focus:ring-sky-300/70'}`}
placeholder="Give your artwork a clear title"
/>
{errors.title && {errors.title}
}
Description *
This upload editor only allows safe formatting and emoji. Images, embeds, and raw HTML are blocked.
{errors.description && {Array.isArray(errors.description) ? errors.description[0] : errors.description}
}
Tags
Use keywords people would search for. Press Enter, comma, or Tab to add a tag.
onChangeTags?.(nextTags)}
suggestedTags={suggestedTags}
searchEndpoint="/api/tags/search"
popularEndpoint="/api/tags/popular"
error={errors.tags}
/>
{typeof publishMode === 'string' && typeof onPublishModeChange === 'function' && (
Publish settings
Choose whether this artwork should publish immediately or on a schedule.
)}
)
}