import styled from 'styled-components';
import React from 'react';
import ConfirmationNotes from './ConfirmationNotes';
import DeliveryInstructions from './DeliveryInstructions';
import ContactWith from '../customer-info/ContactWith';
import { useOrderDetailsConfirmOrder } from '../../../../store';

function SlotAndInstructions() {
  const [orderDetails] = useOrderDetailsConfirmOrder();
  return (
    <Container>
      <Slot>
        <Title>Slot</Title>
        <Value>{orderDetails?.order_routes?.slot}</Value>
      </Slot>
      <ContactWith />
      <DeliveryInstructions />
      <ConfirmationNotes />
    </Container>
  );
}

const Value = styled.span`
  color: #3a3630;
  font-family: 'Lato', 'Open Sans';
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
`;

const Slot = styled.div`
  display: flex;
  flex-direction: column;
  gap: 5px;
`;

const Title = styled.span`
  color: #3a3630;
  font-family: 'Lato', 'Open Sans';
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
`;

const Container = styled.div`
  padding: 15px 12px;
  flex: 1 0 0;
  border-radius: 15px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 15px;
`;

export default SlotAndInstructions;
