// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

export interface IPlanDetails {
  id: number;
  title: string;
  price: string;
  capacityMax: string;
  capacityMin?: string;
}

export const planDetails: IPlanDetails[] = [
  {
    id: 0,
    title: "社区",
    price: "开源",
    capacityMax: "",
  },
  {
    id: 1,
    title: "标准",
    price: "每TB 10美元",
    capacityMax: "（至少100TB）",
    capacityMin: "",
  },
  {
    id: 2,
    title: "企业",
    price: "每TB 20美元",
    capacityMax: "（至少100TB）",
    capacityMin: "",
  },
];

export interface IPlanItemValue {
  label: string;
  detail?: string;
  link?: boolean;
}

export interface IPlanItemValues {
  [index: string]: IPlanItemValue;
}
export interface IPlanItem {
  id: number;
  field: string;
  plans: IPlanItemValues;
  className?: string;
}

export const planItems: IPlanItem[] = [
  {
    id: 0,
    field: "单价",
    className: "unit-price",
    plans: {
      Community: {
        label: "",
        detail: "",
      },
      Standard: {
        label: "$10 per TiB per Month",
        detail: "(Minimum of 100TB)",
      },
      Enterprise: {
        label: "$20 per TiB per Month",
        detail: "(Minimum of 100TB)",
      },
    },
  },
  {
    id: 1,
    field: "许可证",
    className: "license-col",
    plans: {
      Community: {
        label: "GNU AGPL v3",
        detail: "开源",
        link: true,
      },
      Standard: {
        label: "商业的",
      },
      Enterprise: {
        label: "商业的",
      },
    },
  },
  {
    id: 2,
    field: "软件发布",
    plans: {
      Community: {
        label: "上游",
      },
      Standard: {
        label: "1年长期支持",
      },
      Enterprise: {
        label: "5年长期支持",
      },
    },
  },
  {
    id: 3,
    field: "服务协议",
    plans: {
      Community: {
        label: "无服务协议",
      },
      Standard: {
        label: "<48 小时",
        detail: "（当地营业时间）",
      },
      Enterprise: {
        label: "<1 小时",
      },
    },
  },
  {
    id: 4,
    field: "支持",
    plans: {
      Community: {
        label: "社区:",
        detail: "公共 Slack 频道 + Github 问题",
      },
      Standard: {
        label: "L4直接工程",
        detail: " 通过子网提供支持",
      },
      Enterprise: {
        label: "L4直接工程",
        detail: "通过子网提供支持",
      },
    },
  },
  {
    id: 5,
    field: "关键安全性和漏洞检测",
    plans: {
      Community: {
        label: "自我更新",
      },
      Standard: {
        label: "连续扫描和警报",
      },
      Enterprise: {
        label: "连续扫描和警报",
      },
    },
  },
  {
    id: 6,
    field: "紧急按钮",
    plans: {
      Community: {
        label: "N/A",
      },
      Standard: {
        label: "每年1次",
      },
      Enterprise: {
        label: "无限制",
      },
    },
  },
  {
    id: 7,
    field: "健康诊断",
    plans: {
      Community: {
        label: "N/A",
      },
      Standard: {
        label: "24/7/365",
      },
      Enterprise: {
        label: "24/7/365",
      },
    },
  },
  {
    id: 8,
    field: "年度架构审查",
    plans: {
      Community: {
        label: "N/A",
      },
      Standard: {
        label: "N/A",
      },
      Enterprise: {
        label: "是",
      },
    },
  },
  {
    id: 9,
    field: "年度绩效评估",
    plans: {
      Community: {
        label: "N/A",
      },
      Standard: {
        label: "N/A",
      },
      Enterprise: {
        label: "是",
      },
    },
  },
  {
    id: 10,
    field: "保障",
    plans: {
      Community: {
        label: "N/A",
      },
      Standard: {
        label: "N/A",
      },
      Enterprise: {
        label: "是",
      },
    },
  },
  {
    id: 11,
    field: "安全+策略审查",
    plans: {
      Community: {
        label: "N/A",
      },
      Standard: {
        label: "N/A",
      },
      Enterprise: {
        label: "是",
      },
    },
  },
];

export interface IPlanButton {
  id: number;
  text: string;
  text2: string;
  link: string;
  plan: string;
}
export const planButtons: IPlanButton[] = [
  {
    id: 0,
    text: "加入Slack",
    text2: "",
    link: "https://slack.min.io",
    plan: "Community",
  },
  {
    id: 1,
    text: "Subscribe",
    text2: "Sign up",
    link: "https://min.io/signup",
    plan: "Standard",
  },
  {
    id: 2,
    text: "Subscribe",
    text2: "Sign up",
    link: "https://min.io/signup",
    plan: "Enterprise",
  },
];
