using Microsoft.SharePoint.Client;
using SharepointToolbox.Core.Models;
using ModelSiteTemplate = SharepointToolbox.Core.Models.SiteTemplate;

namespace SharepointToolbox.Services;

public interface ITemplateService
{
    Task<ModelSiteTemplate> CaptureTemplateAsync(
        ClientContext ctx,
        SiteTemplateOptions options,
        IProgress<OperationProgress> progress,
        CancellationToken ct);

    Task<string> ApplyTemplateAsync(
        ClientContext adminCtx,
        ModelSiteTemplate template,
        string newSiteTitle,
        string newSiteAlias,
        IProgress<OperationProgress> progress,
        CancellationToken ct);
}
