import PropTypes from 'prop-types';

function Profile({ user }) {
  return (
    <div className='flex flex-col gap-3 caret-transparent sm:flex-row'>
      <div className='flex basis-1/4 items-center justify-center rounded border p-4'>
        <a>مشخصات</a>
      </div>
      <div className='basis-3/4 rounded border p-4'>
        <p>
          <span>نام: </span>
          <span>{user.firstName}</span>
        </p>
        <p>
          <span>نام خانوادگی: </span>
          <span>{user.lastName}</span>
        </p>
        <p>
          <span>موبایل: </span>
          <span>{user.mobile}</span>
        </p>
        <p>
          <span>اعتبار: </span>
          <span>{`${user.credit.toLocaleString()} ریال`}</span>
        </p>
      </div>
    </div>
  );
}

Profile.propTypes = {
  user: PropTypes.object.isRequired
};

export default Profile;
