import { Node } from "../widgets/graph.slint";

export enum Profile {
    Balanced,
    Performance,
    Quiet,
}

export enum FanType {
    CPU,
    Middle,
    GPU,
 }

export global FanPageData {
    in-out property <[Profile]> available_profiles: [Profile.Balanced, Profile.Performance, Profile.Quiet];
    in-out property <[FanType]> available_fans: [FanType.CPU, FanType.Middle, FanType.GPU];

    in-out property <bool> cpu_fan_available: true;
    in-out property <bool> gpu_fan_available: true;
    in-out property <bool> mid_fan_available: false;
    in-out property <bool> balanced_available: true;
    in-out property <bool> performance_available: true;
    in-out property <bool> quiet_available: false;

    in-out property <bool> balanced_cpu_enabled: true;
    in-out property <bool> balanced_gpu_enabled: true;
    in-out property <bool> balanced_mid_enabled: false;
    in-out property <bool> performance_cpu_enabled: true;
    in-out property <bool> performance_gpu_enabled: true;
    in-out property <bool> performance_mid_enabled: false;
    in-out property <bool> quiet_cpu_enabled: true;
    in-out property <bool> quiet_gpu_enabled: true;
    in-out property <bool> quiet_mid_enabled: false;

    callback set_fan_data(FanType, Profile, bool, [Node]);
    callback set_profile_default(Profile);

    in-out property <[Node]> balanced_cpu: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> balanced_mid: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> balanced_gpu: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> performance_cpu: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> performance_mid: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> performance_gpu: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> quiet_cpu: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> quiet_mid: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];
    in-out property <[Node]> quiet_gpu: [
        {
            x: 10px,
            y: 10px,
        },
        {
            x: 40px,
            y: 30px,
        },
        {
            x: 50px,
            y: 50px,
        },
        {
            x: 55px,
            y: 50px,
        },
        {
            x: 60px,
            y: 60px,
        },
        {
            x: 65px,
            y: 70px,
        },
        {
            x: 70px,
            y: 80px,
        },
        {
            x: 90px,
            y: 100px,
        },
    ];

    function set_fan(profile: Profile, fan: FanType, data: [Node]) {
    }
}
