import request from "../request";
import { AxiosPromise, AxiosResponse } from "axios";
interface lightingCombinationListRes {
    code: number
    msg: string,
    rows: [{
        "createTime": string,
        "updateTime": string,
        "id": number,
        "titile": string,
        "operation": string,
        "icon": string,
        "itemId"?: string
    }]

}
interface lightingCombinationIdRes {
    code: number,
    msg: string,
    data: [{
        createTime: string,
        updateTime: string,
        id: number,
        title: string,
        operation: string,
        icon: string,
        voice: string,
        process: number,
        isSelect?: Boolean
    }]


}
interface lightingItemListRes {
    code: number,
    msg: string,
    rows: [{
        createTime: string,
        updateTime: string,
        id: number,
        title: string,
        operation: string,
        icon: string,
        voice: string,
        process: number
    }]

}
export async function lightingCombinationList() {
    let res: AxiosResponse<lightingCombinationListRes> = await request({
        url: "/lighting/combination/list",
        method: "get",

    });
    return res.data;
}
export async function lightingCombinationId(id: number) {
    let res: AxiosResponse<lightingCombinationIdRes> = await request({
        url: "/lighting/combination/" + id,
        method: "get",

    });
    return res.data;
}

export async function lightingItemList() {
    let res: AxiosResponse<lightingItemListRes> = await request({
        url: "/lighting/item/list",
        method: "get",

    });
    return res.data;
}