using Microsoft.AspNetCore.Mvc;
using PlanTempus.Application.Features.Localization.Services;

namespace PlanTempus.Application.Features.Employees.Components;

public class EmployeeDetailServicesViewComponent : ViewComponent
{
    private readonly ILocalizationService _localization;

    public EmployeeDetailServicesViewComponent(ILocalizationService localization)
    {
        _localization = localization;
    }

    public IViewComponentResult Invoke(string key)
    {
        var model = new EmployeeDetailServicesViewModel
        {
            LabelAssignedServices = _localization.Get("employees.detail.services.assigned")
        };

        return View(model);
    }
}

public class EmployeeDetailServicesViewModel
{
    public required string LabelAssignedServices { get; init; }
}
