import { V4Options, v4 } from "uuid";

export interface FormChapter {
	id?: number;
	chapterTitle: string;
	index: number;
	summary: string;
	notes: string;
	genre: string[];
	bands: number[];
	characters: string[];
	relationships: string[][];
	nsfw: boolean;
	loggedInOnly: boolean;
	hidden: boolean;
	content: string;
	file?: string;
	uuidKey: string;
}

export interface FormStory {
	title: string;
	chapters: FormChapter[];
	ficmas?: number | null;
	challenge?: number | null;
	completed: boolean;
}

export const defaultChapter: FormChapter = {
	chapterTitle: "",
	index: 1,
	summary: "",
	notes: "",
	genre: [],
	bands: [],
	characters: [],
	relationships: [],
	nsfw: false,
	loggedInOnly: true,
	hidden: false,
	content: "",
	uuidKey: v4(),
};

export const defaultStory: FormStory = {
	title: "",
	chapters: [],
	ficmas: null,
	challenge: null,
	completed: false,
};
