import {
  PieChartOutlined,
  SettingFilled,
  CloseOutlined,
} from "@ant-design/icons";
import { Menu } from "antd";
import React from "react";
import { Link } from "react-router-dom";
import ipcTypes from "../../../ipc.types";
import SiderSignOut from "../../molecules/sider-sign-out/sider-sign-out.molecule";
const { ipcRenderer } = window;

export default function SiderMenuOrganism() {
  return (
    <Menu defaultSelectedKeys={["1"]} mode="inline">
      <Menu.Item key="1" icon={<PieChartOutlined />}>
        <Link to="/">Jobs</Link>
      </Menu.Item>
      <Menu.Item key="2" icon={<SettingFilled />}>
        <Link to="/settings">Settings</Link>
      </Menu.Item>
      <SiderSignOut />
      <Menu.Divider />
      <Menu.Item
        key="3"
        icon={<CloseOutlined />}
        onClick={() => {
          ipcRenderer.send(ipcTypes.default.quit);
        }}
      >
        Quit
      </Menu.Item>
    </Menu>
  );
}
