using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Components;
using RpgRoller.Contracts;

namespace RpgRoller.Components.Pages.HomeControls;

[ExcludeFromCodeCoverage]
public partial class SkillGroupBlock
{
    [Parameter]
    public string Title { get; set; } = string.Empty;

    [Parameter]
    public Guid? SkillGroupId { get; set; }

    [Parameter]
    public IReadOnlyList<CharacterSheetSkill> Skills { get; set; } = [];

    [Parameter]
    public bool IsMutating { get; set; }

    [Parameter]
    public bool CanEditGroup { get; set; }

    [Parameter]
    public bool CanCreateSkill { get; set; }

    [Parameter]
    public bool HasSkillFilter { get; set; }

    [Parameter]
    public string EmptyMessage { get; set; } = "No skills in this group yet.";

    [Parameter]
    public bool ShowGroupActions { get; set; }

    [Parameter]
    public Func<CharacterSheetSkill, bool> CanEditSkill { get; set; } = _ => false;

    [Parameter]
    public Func<CharacterSheetSkill, string> SkillDefinitionLabel { get; set; } = _ => string.Empty;

    [Parameter]
    public EventCallback<Guid?> AddSkillRequested { get; set; }

    [Parameter]
    public EventCallback<CharacterSheetSkill> EditSkillRequested { get; set; }

    [Parameter]
    public EventCallback<CharacterSheetSkill> RollSkillRequested { get; set; }

    [Parameter]
    public EventCallback<Guid> DeleteSkillRequested { get; set; }

    [Parameter]
    public EventCallback<Guid> EditGroupRequested { get; set; }

    [Parameter]
    public EventCallback<Guid> DeleteGroupRequested { get; set; }
}