import React from "react";

import MyInfoNoResults from "../../MyPagePanel/MyPageSub/MyInfo/MyInfoTabContents/MyInfoNoResults/MyInfoNoResults";
import PaymentItem from "../../MyPagePanel/MyPageSub/MyInfo/MyInfoTabContents/PaymentTab/PaymentItem";
import CheckOutContainer from "./CheckOutContainer";
import css from "./PaymentCard.module.less";

export default function PaymentCard({ list }) {
  return (
    <CheckOutContainer className={css.paymentBox}>
      {list ? (
        <PaymentItem
          easyPmtSeq={list.easyPmtSeq}
          cardKnd={list.cardKnd}
          cardNo={list.cardNo}
        />
      ) : (
        <MyInfoNoResults type="PAYMENT" />
      )}
    </CheckOutContainer>
  );
}
