using AutoMapper; using LANCommander.SDK.Enums; using LANCommander.SDK.Models.Manifest; using LANCommander.Server.ImportExport.Exceptions; using LANCommander.Server.ImportExport.Models; using LANCommander.Server.Services; namespace LANCommander.Server.ImportExport.Exporters; public class ScriptExporter( IMapper mapper, ScriptService scriptService) : BaseExporter { public override async Task GetExportInfoAsync(Data.Models.Script record) { return new ExportItemInfo { Id = record.Id, Type = ImportExportRecordType.Script, Name = record.Name, Size = record.Contents.Length, }; } public override bool CanExport(Script record) => ExportContext.DataRecord is Data.Models.Game || ExportContext.DataRecord is Data.Models.Redistributable || ExportContext.DataRecord is Data.Models.Server; public override async Task