"use strict";

const required = require("@validatem/required");
const isString = require("@validatem/is-string");
const arrayOf = require("@validatem/array-of");

const isTimelineEvent = require("../is-timeline-event");
const isStateEvent = require("../is-state-event");
const optionalArray = require("../optional-array");

let isTimelineList = arrayOf([ required, isTimelineEvent ]);
let isStateList = arrayOf([ required, isStateEvent ]);

module.exports = {
	start: [ required, isString ],
	end: [ isString ],
	chunk: optionalArray(isTimelineList),
	state: optionalArray(isStateList)
};
