"use client";

export default function ProfileSection({
  customer,
}: {
  customer: any;
}) {
  if (!customer) return 'No customer data';

  return (
    <>
      <h1>Profile Details</h1>

      <div
        style={{
          background: "#fff",
          padding: 24,
          borderRadius: 12,
          marginTop: 20,
        }}
      >
        <p>
          <strong>Name:</strong> {customer.name}
        </p>

        <p>
          <strong>Email:</strong> {customer.email}
        </p>

        <p>
          <strong>Phone:</strong> {customer.phone}
        </p>

        <p>
          <strong>Address:</strong> {customer.address_line1}
        </p>

        <p>
          <strong>City:</strong> {customer.city}
        </p>

        <p>
          <strong>State:</strong> {customer.state}
        </p>

        <p>
          <strong>Pincode:</strong> {customer.pincode}
        </p>

        <p>
          <strong>Country:</strong> {customer.country}
        </p>
      </div>
    </>
  );
}