namespace Inspectron.Epson.Templates.Configuration;

public record TemplateAssignment(
    int ReceiptType,
    string? ProfileId,
    string TemplatePath)
{
    public bool MatchesExact(int receiptType, string profileId)
    {
        return ReceiptType == receiptType &&
               !string.IsNullOrEmpty(ProfileId) &&
               ProfileId.Equals(profileId, StringComparison.OrdinalIgnoreCase);
    }

    public bool MatchesTypeOnly(int receiptType)
    {
        return ReceiptType == receiptType && string.IsNullOrEmpty(ProfileId);
    }
}
