// Contains the details required to lookup train details
export interface Detail {
    show: boolean;
    headcode: string;
    rid: string;
    uid: string;
}

// Initiates/Resets a `Detail` interface
export function detailInit(): Detail {
    const detail: Detail = {
        show: false,
        headcode: "",
        rid: "",
        uid: "",
    };
    return detail;
}

// Initiates/Updates a `Detail` interface using the given values
export function defineDetail(rid: string, uid: string, tid: string) {
    const detail: Detail = {
        rid: rid,
        uid: uid,
        headcode: tid,
        show: true,
    };
    return detail;
}
