import { IsoDate } from "../common";

import { Car, Customer, Washing } from ".";

export type Id = string;

export type Status = 'pending' |
  'progress' |
  'working' |
  'canceled' |
  'complete';

export type Create = {
  customer: {
    phone: Customer.PhoneNumber,
  };
  car: {
    number: Car.RegistrationNumber,
    body: Car.BodyStyle,
    color: Car.Color,
  },
  washing: {
    location: Washing.Location
    begin: Washing.AvailableBeginDateTime,
    end: Washing.AvailableEndDateTime,
  }
};

export type View = {
  phone: Customer.PhoneNumber;
  carNumber: Car.RegistrationNumber;
  carBody: Car.BodyStyle;
  carColor?: Car.Color;
  location: Washing.Location;
  startWashTime: Washing.AvailableBeginDateTime;
  endWashTime: Washing.AvailableEndDateTime;
  status: Status,
  notes: string;
  created: IsoDate;
  updated: IsoDate;
  id: Id;
};