import { Col, Row } from "antd";
import React, { useEffect } from "react";
import ipcTypes from "../../../ipc.types";
import NotificationsToggleAtom from "../../atoms/notifications-toggle/notifications-toggle.atom";
import WatcherStartupAtom from "../../atoms/watcher-startup/watcher-startup.atom";
import WatcherPollingMolecule from "../../molecules/watcher-polling/watcher-polling.molecule";
import FilePathsListOrganism from "../../organisms/filepaths-list/filepaths-list.organism";
import ShopSettingsOrganism from "../../organisms/shop-settings/shop-settings.organism";
import WatcherManagerOrganism from "../../organisms/watcher-manager/watcher-manager.organism";
const { ipcRenderer } = window;

export default function SettingsPage() {
  useEffect(() => {
    ipcRenderer.send(ipcTypes.store.getAll);
  }, []);

  return (
    <div>
      <Row gutter={[16, 16]}>
        <Col span={18}>
          <FilePathsListOrganism />
        </Col>
        <Col span={6}>
          <WatcherManagerOrganism />
          <WatcherPollingMolecule />
          <NotificationsToggleAtom />
          <WatcherStartupAtom />
        </Col>
      </Row>

      <ShopSettingsOrganism />
    </div>
  );
}
