///
/// class: FitTracker.cs
///
///This file defines the FitTracker class, which represents a fitness tracker device. It implements 
///the IWearable interface and includes properties for water resistance and other fitness-specific features.
///
/// Name: Rens Pastoor
/// Studentnumber: 555408
/// Date: 11 may 2025
///
///Version: 1
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PoloClubApp {
    /// <summary>
    /// Represents a fitness tracker device that implements IWearable interface.
    /// </summary>
    public class FitTracker : Device, IWearable {
        /// <summary>
        /// Gets the type of the device (always "FitTracker").
        /// </summary>
        public string DeviceType { get; } = "FitTracker";

        /// <summary>
        /// Gets the water resistance rating in meters.
        /// </summary>
        public int WaterResistanceMeters { get; }

        /// <summary>
        /// Gets the color of the fitness tracker.
        /// </summary>
        public string Color { get; }

        /// <summary>
        /// Initializes a new instance of the FitTracker class.
        /// </summary>
        /// <param name="id">The unique device identifier.</param>
        /// <param name="name">The name of the fitness tracker.</param>
        /// <param name="waterResistanceMeters">Water resistance rating in meters.</param>
        /// <param name="color">The color of the device.</param>
        public FitTracker(int id, string name, int waterResistanceMeters, string color) 
            : base(id, name)
        {
            WaterResistanceMeters = waterResistanceMeters;
            Color = color;
        }

        /// <summary>
        /// Gets detailed information about the fitness tracker.
        /// </summary>
        /// <returns>Formatted string with device details.</returns>
        public override string GetDetails()
        {
        return $"{DeviceType} - Id: {Id}, Name: {Name}, " +
               $"Water Resistance: {WaterResistanceMeters}m, " +
               $"Color: {Color}";
        }

        /// <summary>
        /// Gets the water resistance rating.
        /// </summary>
        /// <returns>Water resistance in meters.</returns>
        public int GetWaterResistanceMeters()
        {
            return WaterResistanceMeters;
        }
}
}
