package com.example.pap_teste.models;

import java.util.List;
import java.util.Map;

public class Restaurant {
    private String id;
    private String name;
    private String cuisine;
    private String category;
    private String email;
    private String description;
    private String imageURL;
    private String logoUrl;
    private double rating;
    private Double ratingAvg;
    private String address;
    private Map<String, String> openingHours; // { "open": "09:00", "close": "22:00" }
    private List<String> availableSlots;
    private boolean favorite;

    public Restaurant() {}

    public Restaurant(String name, String category, String email, boolean favorite, String logoUrl) {
        this.name = name;
        this.category = category;
        this.email = email;
        this.favorite = favorite;
        this.logoUrl = logoUrl;
        this.cuisine = category;
        this.imageURL = logoUrl;
    }

    public String getId() { return id; }
    public void setId(String id) { this.id = id; }
    
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    
    public String getCuisine() { return cuisine; }
    public void setCuisine(String cuisine) { this.cuisine = cuisine; }
    
    public String getCategory() { return category != null ? category : cuisine; }
    public void setCategory(String category) { this.category = category; }
    
    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }
    
    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }
    
    public String getImageURL() { return imageURL != null ? imageURL : logoUrl; }
    public void setImageURL(String imageURL) { this.imageURL = imageURL; }
    
    public String getLogoUrl() { return logoUrl != null ? logoUrl : imageURL; }
    public void setLogoUrl(String logoUrl) { this.logoUrl = logoUrl; }
    
    public double getRating() { return rating; }
    public void setRating(double rating) { this.rating = rating; }
    
    public Double getRatingAvg() { return ratingAvg; }
    public void setRatingAvg(Double ratingAvg) { this.ratingAvg = ratingAvg; }
    
    public String getAddress() { return address; }
    public void setAddress(String address) { this.address = address; }
    
    public Map<String, String> getOpeningHours() { return openingHours; }
    public void setOpeningHours(Map<String, String> openingHours) { this.openingHours = openingHours; }
    
    public List<String> getAvailableSlots() { return availableSlots; }
    public void setAvailableSlots(List<String> availableSlots) { this.availableSlots = availableSlots; }
    
    public boolean isFavorite() { return favorite; }
    public void setFavorite(boolean favorite) { this.favorite = favorite; }
}
