import styled from 'styled-components';
import CloseIcon from '../../../../assets/svg/closeIcon';
import Button from '../../../button';
import oops from '../../../../assets/images/oops.png';
const RenewModal = ({
  img,
  close,
  titleText,
  titleColor,
  btn1Text,
  btn2Text,
  btn1onClick,
  btn2onClick,
  message,
}) => {
  return (
    <Container>
      <Wrapper>
        <span onClick={close}>
          <CloseIcon />
        </span>
        <Content>
          <img src={img || oops} alt="" />
          <h2
            style={{
              color: titleColor || '#00C2C2',
            }}
          >
            {titleText || 'Oops!'}
          </h2>
          <p>{message}</p>
          <BtnGroup>
            <Button
              type="secondary"
              text={btn1Text || 'Select plans'}
              onClick={btn1onClick}
            />
            <Button
              text={btn2Text || 'Renew subscription'}
              onClick={btn2onClick}
            />
          </BtnGroup>
        </Content>
      </Wrapper>
    </Container>
  );
};
export default RenewModal;
const Container = styled.div`
  display: grid;
  place-items: center;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.15);
`;
const Wrapper = styled.div`
  width: 820px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  span {
    display: inline-flex;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    background: #fff;
  }
`;
const Content = styled.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 45px 26px;
  width: 100%;
  min-height: 464px;
  background-color: #fff;
  border-radius: 30px;
  display: flex;
  img {
    width: 125px;
    height: 125px;
    object-fit: contain;
  }
  h2 {
    margin-top: 13px;
    margin-bottom: 15px;
    font-size: 40px;
    font-weight: 700;
  }
  p {
    max-width: 754px;
    font-size: 24px;
    text-align: center;
    font-weight: 500;
    line-height: 35px; /* 36.336px */
  }
`;
const BtnGroup = styled.div`
  display: flex;
  gap: 20px;
  margin-top: auto;

  button {
    height: 52px;
    min-width: 168px;
    padding: 0 20px;
    font-size: 14px;
    box-shadow: 0px 10px 20px 0px rgba(254, 191, 16, 0.25);
  }
`;
