import { Col, Row } from "antd";
import React from "react";
import ShopEmployeesFormComponent from "./shop-employees-form.component";
import ShopEmployeesListComponent from "./shop-employees-list.component";
export default function ShopEmployeeComponent({
  form,
  loading,
  employees,
  employeeState,
  handleSubmit,
  handleDelete
}) {
  const [selectedEmployee, setSelectedEmployee] = employeeState;
  return (
    <Row>
      <Col span={6}>
        <ShopEmployeesListComponent
          employees={employees}
          loading={loading}
          setSelectedEmployee={setSelectedEmployee}
          handleDelete={handleDelete}
        />
      </Col>

      <Col span={18}>
        <ShopEmployeesFormComponent
          handleSubmit={handleSubmit}
          form={form}
          selectedEmployee={selectedEmployee}
        />
      </Col>
    </Row>
  );
}
