using ERPCore.Common.Http;
using ERPCore.Domain.Enums;
using ERPCore.Dtos.Common;
using ERPCore.Dtos.ItemTypes;

namespace ERPCore.Services.Interfaces;

/// <summary>
/// Item type master business logic (docs/11-BACKEND-PHASE1.md §2.7). Plain CRUD over an
/// unlinked list — no item ever references an item type (docs/10 Part C.9), so there is
/// nothing here beyond maintaining the names the builder's dropdown reads.
/// </summary>
public interface IItemTypeService
{
    Task<PagedResponse<ItemTypeDto>> ListAsync(PageQuery query, EntityStatus? status, CancellationToken ct = default);
    Task<ETagged<ItemTypeDto>?> GetAsync(int itemTypeId, CancellationToken ct = default);
    Task<ETagged<ItemTypeDto>> CreateAsync(CreateItemTypeRequest request, CancellationToken ct = default);
    Task<ETagged<ItemTypeDto>> UpdateAsync(int itemTypeId, UpdateItemTypeRequest request, uint expectedRowVersion, CancellationToken ct = default);
    Task SetStatusAsync(int itemTypeId, EntityStatus status, CancellationToken ct = default);
}
