import 'package:niogu_ecommerce_v1/features/account/data/models/account_model.dart';
import 'package:uuid/uuid.dart';

class CustomerInfo {
  final String name;
  final String? email;
  final String phoneNumber;

  const CustomerInfo({
    required this.name,
    required this.email,
    required this.phoneNumber,
  });
}

class CustomerAddress {
  final String uuid;

  final String label;

  final String fullAddress;

  final double latitude;

  final double longitude;

  const CustomerAddress({
    required this.uuid,
    required this.label,
    required this.fullAddress,
    required this.latitude,
    required this.longitude,
  });

  CustomerAddressModel toCustomerAddressModel() {
    return CustomerAddressModel(
      uuid: uuid,
      label: label,
      fullAddress: fullAddress,
      latitude: latitude,
      longitude: longitude,
    );
  }
}

class SelectedAddress {
  final String id;
  final String? label;
  final String fullAddress;
  final double latitude;
  final double longitude;

  SelectedAddress({
    String? id,
    this.label,
    required this.fullAddress,
    required this.latitude,
    required this.longitude,
  }) : id = id ?? const Uuid().v7().toString();

  SelectedAddress copyWith({required String label}) {
    return SelectedAddress(
      id: id,
      label: label,
      fullAddress: fullAddress,
      latitude: latitude,
      longitude: longitude,
    );
  }
}
