import { PublicServicesResults } from "./Service.model";

export interface MyOranizationsView {
    id: string;
    name: string;
    slug: string;
    description: string;
    categoryId: number;
    ownerId: string;
    employeeId: string;
    isOwner: boolean;
    isAdmin: boolean;
    hostOk: boolean;
    guestOk: boolean;
    fullOk: boolean;
    headerFile: string;
    headerColor: string;
    headerFontColor: string;
    headerFontShadowColor: string;
    iconFile: string;
    logoFile: string;
    phoneAreaCode: string;
    phoneNumber: string;
    heatMapFraction: number;
    cancellationTime: number;
    appointmentTime: number;
    street: string;
    streetNumber: string;
    builingFloor: string;
    buildingApartament: string;
    block: string;
    city: string;
    state: string;
    country: string;
    zipCode: string;
    latitude: number;
    longitude: number;
    published: COMPANY_PUBLISHED_STATUS;
    appointmentAlert: string;
    templateWapNotifId: string;
    templateWapAltaId: string;
    templateEmailNotifId: string;
    templateEmailAltaId: string;
    onboardingStep?: number;
    onboardingCompleted?: boolean;
}

export type CreateCompanyParams = {
    name: string;
    description: string;
    categoryId: number;
    ownerId: string;
    onboardingStep?: number;
};

export type UpdateCompanyParams = {
    id: string;
    name?: string;
    description?: string;
    categoryId?: number;
    headerFile?: string;
    iconFile?: string;
    logoFile?: string;
    headerColor?: string;
    headerFontColor?: string;
    headerFontShadowColor?: string;
    street?: string;
    streetNumber?: string;
    builingFloor?: string;
    buildingApartament?: string;
    block?: string;
    city?: string;
    state?: string;
    country?: string;
    zipCode?: string;
    latitude?: number;
    longitude?: number;
    phoneCountryCode?: string;
    phoneAreaCode?: string;
    phoneNumber?: string;
    heatMapFraction?: number;
    appointmentTime?: number;
    cancellationTime?: number;
    appointmentAlert?: string;
    sessionUser: string;
    templateWapNotifId?: string;
    templateWapAltaId?: string;
    templateEmailNotifId?: string;
    templateEmailAltaId?: string;
    onboardingStep?: number;
    onboardingCompleted?: boolean;
};

export type DeleteCompanyParams = {
    companyId: string;
    sessionUser: string;
};

export enum COMPANY_PUBLISHED_STATUS {
    PUBLISHED = "published",
    PRIVATE = "private",
}

export type SetOrganizationPublishedStatusParams = {
    companyId: string;
    published: COMPANY_PUBLISHED_STATUS;
    sessionUser: string;
};

export interface OranizationsViewByIdParams {
    id: string;
    sessionUser: string;
}

export interface ICompany {
    id?: string;
    name: string;
    slug: string;
    description: string;
    categoryId: number;
    ownerId: string;
    headerFile?: string;
    headerColor?: string;
    headerFontColor?: string;
    headerFontShadowColor?: string;
    iconFile?: string;
    logoFile?: string;
    street?: string;
    streetNumber?: string;
    builingFloor?: string;
    buildingApartament?: string;
    block?: string;
    city?: string;
    state?: string;
    country?: string;
    zipCode?: string;
    latitude?: number;
    longitude?: number;
    phoneCountryCode?: string;
    phoneAreaCode?: string;
    phoneNumber?: string;
    heatMapFraction?: number;
    appointmentTime?: number;
    cancellationTime?: number;
    published?: COMPANY_PUBLISHED_STATUS;
    appointmentAlert?: string;
    templateWapNotifId?: string;
    templateWapAltaId?: string;
    templateEmailNotifId?: string;
    templateEmailAltaId?: string;
    onboardingStep?: number;
    onboardingCompleted?: boolean;
    fixedPostIds?: Array<string>;
    banned?: boolean;
}

export type PublicOrganizationViewParams = {
    companyId: string;
};

export type PublicOrganizationView = {
    id: string;
    headerFile: string;
    headerColor: string;
    headerFontColor: string;
    headerFontShadowColor: string;
    iconFile: string;
    logoFile: string;
    categoryId: number;
    name: string;
    slug: string;
    description: string;
    services: PublicServicesResults;
    employees: PublicServicesResults;
    address: string;
    phone: string;
    latitude: number;
    longitude: number;
    appointmentAlert: string;
    banned?: boolean;
};

export type SetNotificationAutoParams = {
    companyId: string;
    status?: boolean;
    sessionUser: string;
};

export type FixCompanyPostParams = {
    companyId: string;
    postId: string;
    sessionUser: string;
};

export type MoveCompanyFixedPostParams = {
    companyId: string;
    postId: string;
    moveLength: number;
    sessionUser: string;
};
