import { type ListFrontEndInterface } from '../CommonType'

export interface ServiceUserListDataTypeInterface extends ServiceListViewType {
    key: React.Key
}

export interface ServiceUserListType {
    serviceId: number
    userId: number
    userName: string
    imageURL: string
}

export interface ServiceListViewType {
    serviceId: number
    serviceName: string
    communicationEmail: string
    defaultAssigneeUser: ServiceUserListType[]
    defaultUser: ServiceUserListType[]
}

export interface ServicePayloadInterface {
    data: ServiceListViewType[]
    noOfRecords: number
}

export interface ServiceUserListInterface {
    serviceUserList: ServiceUserListDataTypeInterface[]
}

export interface ServiceUserAddAssigneeStateInterface {
    userList: ListFrontEndInterface[]
}

export interface ServiceUserAddAssigneeInterface
    extends ServiceUserAddAssigneeStateInterface {
    serviceId: number
    onSave: (data: ServiceUserPostData, callBack: CallableFunction) => void
}

export interface ServiceUserSwitchUserInterface
    extends ServiceUserAddAssigneeStateInterface {
    serviceId: number
    onSave: (data: SwitchUserFormData, callBack: CallableFunction) => void
}

export interface ServiceUserPostData {
    serviceId: number
    userIds: number[]
}

export interface SwitchUserFormData {
    switchUserType: number
    serviceProcessId: number
    existUserId: number
    newUserId: number
    existUserState: number
    serviceId: number
    newUserState: number
}
