export interface AuctionCustomerDetail {
    id: number | null;
    name: string | null;
    first_name: string | null;
    last_name: string | null;
    username: string | null;
    email: string | null;
    mobile_number: string | null;
    address_line: string | null;
}

export interface AuctionUploadDetail {
    upload_id: number;
    path: string;
    name: string;
    type: string;
    url: string;
    full_url?: string;
    is_featured: boolean;
}

export interface PlateItemDetail {
    combination: string;
    state: string;
    display_label: string;
    display_state: boolean;
    display_state_label: string;
    display_position: string | null;
    display_position_label: string;
    background: string | null;
    characters: string | null;
    frame: boolean;
    frame_label: string;
    width: string | null;
    width_label: string;
    category: string | null;
    category_heading: string | null;
    vehicle: string | null;
    specifications: string | null;
}

export interface CarItemDetail {
    year: number | null;
    state: string | null;
    make: string | null;
    model: string | null;
    odometer_km: number | null;
    body_type: string | null;
    engine: string | null;
    exterior_colour: string | null;
    interior_colour: string | null;
    doors: number | null;
    transmission: string | null;
    drive_side: string | null;
    service_history: string | null;
    car_inspection: string | null;
    condition: string | null;
    specifications: string | null;
    vehicle_history_report_name: string | null;
    vehicle_history_report_url: string | null;
}

export interface PartsItemDetail {
    state: string | null;
    description: string | null;
    specifications: string | null;
    condition: string | null;
}

export interface AuctionBiddingHistoryRow {
    id: number;
    type: string;
    name: string;
    first_name: string | null;
    last_name: string | null;
    username: string | null;
    user_id: number;
    user_email: string | null;
    price: string;
    is_auto: boolean;
    auto_bid: {
        max_amount: string;
        created_at: string | null;
    } | null;
    created_at: string;
    status: string;
    winner_position: number | null;
    is_paid: boolean;
    payment_due_date: string | null;
}

export interface AuctionRoundDetail {
    id: number;
    round_number: number;
    is_current: boolean;
    is_featured: boolean;
    is_upcoming: boolean;
    start_date_time: string | null;
    end_date_time: string | null;
    status: string;
    status_label: string;
    status_color: string;
    sold_price: string | null;
    winner_bid_id: number | null;
    is_admin_chosen_winner: boolean;
    choose_winner_url: string;
    mark_bid_paid_url: string;
    cancel_bid_url: string;
    total_bids: number;
    current_bid: string | null;
    bidding_history: AuctionBiddingHistoryRow[];
}

export interface OnlineAuctionDetail {
    id: number;
    title: string;
    display_label: string;
    description: string | null;
    category: string;
    category_label: string;
    status: string;
    status_label: string;
    status_display_label: string;
    status_color: string;
    reserve_price: string;
    sold_price: string | null;
    sold_at: string | null;
    payment_methods: string | null;
    is_featured: boolean;
    is_relisted: boolean;
    can_relist: boolean;
    can_edit: boolean;
    can_reschedule: boolean;
    can_cancel: boolean;
    cancel_label: string;
    send_messages_auction_id: number;
    has_ended: boolean;
    reserve_met: boolean | null;
    show_reserve_met: boolean;
    is_live: boolean;
    created_at: string | null;
    start_date_time: string | null;
    end_date_time: string | null;
    client_start_date_time: string | null;
    period_type: string | null;
    period_length: number | null;
    period_label: string | null;
    image_path: string | null;
    image_url: string | null;
    plate_image_url: string | null;
    customer: AuctionCustomerDetail;
    enquiry: import('@/types/onlineAuctionEnquiry').EnquiryDetail | null;
    uploads: AuctionUploadDetail[];
    plate: PlateItemDetail | null;
    car: CarItemDetail | null;
    parts: PartsItemDetail | null;
    rounds: AuctionRoundDetail[];
}

export type ChooseWinnerAuctionPatch = Pick<
    OnlineAuctionDetail,
    | 'status'
    | 'status_label'
    | 'status_display_label'
    | 'status_color'
    | 'sold_price'
    | 'sold_at'
    | 'reserve_met'
    | 'show_reserve_met'
    | 'is_live'
    | 'has_ended'
>;
