/**
 * Copyright (c) 2022, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
 *
 * This software is the property of WSO2 LLC. and its suppliers, if any.
 * Dissemination of any information or reproduction of any material contained
 * herein in any form is strictly forbidden, unless permitted by WSO2 expressly.
 * You may not alter or remove any copyright or other notice from copies of this content.
 */

import { I18n } from "@wso2is/i18n";

/*
 * Logs constants.
 */
export class LogsConstants {

    /**
     * Log entries fetched per a single request.
     */
    public static readonly LOG_FETCH_COUNT: number = 100;

    /**
     * Height of a single log row in collapsed state.
     */
    public static readonly LOG_ROW_HEIGHT: number = 48;

    /**
     * Time zone related data array
     */
    public static readonly TIME_ZONE_DATA: Array<{key: number, text: string, value: string}> = [
        { key: 0, text: "(GMT+00:00) UTC", value: "GMT+0000"  },
        { key: 1, text: "(GMT+01:00) ECT", value: "GMT+0100"  },
        { key: 2, text: "(GMT+02:00) EET", value: "GMT+0200"  },
        { key: 3, text: "(GMT+02:00) ART", value: "GMT+0200"  },
        { key: 4, text: "(GMT+03:00) EAT", value: "GMT+0300"  },
        { key: 5, text: "(GMT+03:30) MET", value: "GMT+0330"  },
        { key: 6, text: "(GMT+04:00) NET", value: "GMT+0400"  },
        { key: 7, text: "(GMT+05:00) PLT", value: "GMT+0500"  },
        { key: 8, text: "(GMT+05:30) IST", value: "GMT+0530"  },
        { key: 9, text: "(GMT+06:00) BST", value: "GMT+0600"  },
        { key: 10, text: "(GMT+07:00) VST", value: "GMT+0700"  },
        { key: 11, text: "(GMT+08:00) CTT", value: "GMT+0800"  },
        { key: 12, text: "(GMT+09:00) JST", value: "GMT+0900"  },
        { key: 13, text: "(GMT+09:30) ACT", value: "GMT+0930"  },
        { key: 14, text: "(GMT+10:00) AET", value: "GMT+1000"  },
        { key: 15, text: "(GMT+11:00) SST", value: "GMT+1100"  },
        { key: 16, text: "(GMT+12:00) NST", value: "GMT+1200"  },
        { key: 17, text: "(GMT-11:00) MIT", value: "GMT-1100"  },
        { key: 18, text: "(GMT-10:00) HST", value: "GMT-1000"  },
        { key: 19, text: "(GMT-09:00) AST", value: "GMT-0900"  },
        { key: 20, text: "(GMT-08:00) PST", value: "GMT-0800"  },
        { key: 21, text: "(GMT-07:00) PNT", value: "GMT-0700"  },
        { key: 22, text: "(GMT-07:00) MST", value: "GMT-0700"  },
        { key: 23, text: "(GMT-06:00) CST", value: "GMT-0600"  },
        { key: 24, text: "(GMT-05:00) EST", value: "GMT-0500"  },
        { key: 25, text: "(GMT-05:00) IET", value: "GMT-0500"  },
        { key: 26, text: "(GMT-04:00) PRT", value: "GMT-0400"  },
        { key: 27, text: "(GMT-03:30) CNT", value: "GMT-0330"  },
        { key: 28, text: "(GMT-03:00) AGT", value: "GMT-0300"  },
        { key: 29, text: "(GMT-03:00) BET", value: "GMT-0300"  },
        { key: 30, text: "(GMT-01:00) CAT", value: "GMT-0100"  }
    ];

    /**
     * Time range dropdown options
     */
    public static readonly TIMERANGE_DROPDOWN_OPTIONS: Array<{ key: number; text: string; value: number; }> = [
        {
            key: 0,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.0"),
            value: 0.25
        },
        {
            key: 1,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.1"),
            value: 0.5
        },
        {
            key: 2,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.2"),
            value: 1
        },
        {
            key: 3,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.3"),
            value: 4
        },
        {
            key: 4,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.4"),
            value: 12
        },
        {
            key: 5,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.5"),
            value: 24
        },
        {
            key: 6,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.6"),
            value: 48
        },
        {
            key: 7,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.7"),
            value: 72
        },
        {
            key: 8,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.8"),
            value: 168
        },
        {
            key: 9,
            text: I18n.instance.t("extensions:develop.monitor.filter.dropdowns" +
                ".timeRange.texts.9"),
            value: -1
        }
    ];
}
