import 'package:latlong2/latlong.dart';
import 'package:niogu_ecommerce_v1/core/enums/campaign_type.dart';

class Home {
  final CurrentOutlet currentOutlet;
  final List<CampaignByOutlet> campaigns;
  final List<CategoryItem> categories;
  final List<OtherOutlet> otherOutlets;
  final List<ProductItem> recommendations;
  final List<ProductItem> allProducts;

  const Home({
    required this.currentOutlet,
    required this.campaigns,
    required this.categories,
    required this.otherOutlets,
    required this.recommendations,
    required this.allProducts,
  });
}

class OperationalService {
  final String onlineOpenTime;
  final String onlineCloseTime;
  final bool isCloseService;
  const OperationalService({
    required this.onlineOpenTime,
    required this.onlineCloseTime,
    required this.isCloseService,
  });
}

class CurrentOutlet {
  final String id;
  final String name;
  final String? location;
  final LatLng? coordinate;
  final bool isActive;

  CurrentOutlet({
    required this.id,
    required this.name,
    required this.location,
    this.coordinate,
    required this.isActive,
  });
}

class CampaignByOutlet {
  final CampaignType? campaignType;
  final String? actionRefId;
  final String? image;

  const CampaignByOutlet({this.campaignType, this.actionRefId, this.image});
}

class CategoryItem {
  final String id;
  final String? image;
  final String name;

  const CategoryItem({required this.id, this.image, required this.name});
}

class MainOutlet {
  final String uuid;

  final String name;

  final String? phoneNumber;

  final String? location;

  final double? latitude;

  final double? longitude;

  const MainOutlet({
    required this.uuid,
    required this.name,
    this.phoneNumber,
    this.location,
    this.latitude,
    this.longitude,
  });
}

class OtherOutlet {
  final String id;
  final String? image;
  final String name;
  final String? phoneNumber;
  final String? location;
  final LatLng? coordinate;
  final bool isActive;

  const OtherOutlet({
    required this.id,
    this.image,
    required this.name,
    this.phoneNumber,
    this.location,
    this.coordinate,
    required this.isActive,
  });
}

class ProductItem {
  final String id;
  final String? image;
  final String name;
  final double totalSold;
  final double averageRating;
  final double sellingPrice;
  final int likes;

  const ProductItem({
    required this.id,
    this.image,
    required this.name,
    required this.totalSold,
    required this.averageRating,
    required this.sellingPrice,
    required this.likes,
  });
}

enum ProcessSearch { initial, suggestion, result }
