@page "/library/manage/item" @page "/library/manage/item/{id:guid}" @using Lumina.Presentation.Web.Common.Enums.AudioLibrary @using Lumina.Presentation.Web.Common.Enums.BookLibrary @using Lumina.Presentation.Web.Common.Enums.Library @using Lumina.Presentation.Web.Common.Enums.PhotoLibrary @using Lumina.Presentation.Web.Common.Enums.VideoLibrary @using Lumina.Presentation.Web.Common.Models.Libraries @using Lumina.Presentation.Web.Common.Models.UI @using Lumina.Presentation.Web.Common.Utilities @using Lumina.Presentation.Web.Components

@(Id is null ? "Add New Library" : "Edit Library")

DescriptionTitle
DescriptionLibraryType
@foreach (var item in tableData) { }
Column 1 Column 2 Directories
@item.Column1 @item.Column2 @* *@
DescriptionURL
DescriptionPort
DescriptionUsername
DescriptionPassword
DescriptionPlatform
Cancel Save
@code { [Parameter] public Guid? Id { get; set; } private LibraryModel dataSource = new(); private List> items = new() { new ComboboxItem{ Text = nameof(LibraryType.WrittenContent).SplitCamelCase(), IsEnabled = false }, new ComboboxItem{ Text = nameof(WrittenContentType.Book).SplitCamelCase(), Value = nameof(WrittenContentType.Book) }, new ComboboxItem{ Text = nameof(WrittenContentType.EBook).SplitCamelCase(), Value = nameof(WrittenContentType.EBook) }, new ComboboxItem{ Text = nameof(WrittenContentType.BookSeries).SplitCamelCase(), Value = nameof(WrittenContentType.BookSeries) }, new ComboboxItem{ Text = nameof(WrittenContentType.ComicBook).SplitCamelCase(), Value = nameof(WrittenContentType.ComicBook) }, new ComboboxItem{ Text = nameof(WrittenContentType.ComicSeries).SplitCamelCase(), Value = nameof(WrittenContentType.ComicSeries) }, new ComboboxItem{ Text = nameof(WrittenContentType.Magazine).SplitCamelCase(), Value = nameof(WrittenContentType.Magazine) }, new ComboboxItem{ Text = nameof(WrittenContentType.Manga).SplitCamelCase(), Value = nameof(WrittenContentType.Manga) }, new ComboboxItem{ Text = nameof(WrittenContentType.GraphicNovel).SplitCamelCase(), Value = nameof(WrittenContentType.GraphicNovel) }, new ComboboxItem{ Text = nameof(WrittenContentType.AcademicPaper).SplitCamelCase(), Value = nameof(WrittenContentType.AcademicPaper) }, new ComboboxItem{ Text = nameof(WrittenContentType.SheetMusic).SplitCamelCase(), Value = nameof(WrittenContentType.SheetMusic) }, new ComboboxItem{ Text = nameof(WrittenContentType.Screenplay).SplitCamelCase(), Value = nameof(WrittenContentType.Screenplay) }, new ComboboxItem{ Text = nameof(LibraryType.VideoContent).SplitCamelCase(), IsEnabled = false }, new ComboboxItem{ Text = nameof(VideoContentType.TvShow).SplitCamelCase(), Value = nameof(VideoContentType.TvShow) }, new ComboboxItem{ Text = nameof(VideoContentType.Movie).SplitCamelCase(), Value = nameof(VideoContentType.Movie) }, new ComboboxItem{ Text = nameof(VideoContentType.FilmSeries).SplitCamelCase(), Value = nameof(VideoContentType.FilmSeries) }, new ComboboxItem{ Text = nameof(VideoContentType.FilmFranchise).SplitCamelCase(), Value = nameof(VideoContentType.FilmFranchise) }, new ComboboxItem{ Text = nameof(VideoContentType.Concert).SplitCamelCase(), Value = nameof(VideoContentType.Concert) }, new ComboboxItem{ Text = nameof(VideoContentType.Documentary).SplitCamelCase(), Value = nameof(VideoContentType.Documentary) }, new ComboboxItem{ Text = nameof(VideoContentType.Tutorial).SplitCamelCase(), Value = nameof(VideoContentType.Tutorial) }, new ComboboxItem{ Text = nameof(VideoContentType.Personal).SplitCamelCase(), Value = nameof(VideoContentType.Personal) }, new ComboboxItem{ Text = nameof(VideoContentType.Anime).SplitCamelCase(), Value = nameof(VideoContentType.Anime) }, new ComboboxItem{ Text = nameof(VideoContentType.Youtube).SplitCamelCase(), Value = nameof(VideoContentType.Youtube) }, new ComboboxItem{ Text = nameof(VideoContentType.Videoclip).SplitCamelCase(), Value = nameof(VideoContentType.Videoclip) }, new ComboboxItem{ Text = nameof(LibraryType.AudioContent).SplitCamelCase(), IsEnabled = false }, new ComboboxItem{ Text = nameof(AudioContentType.Music).SplitCamelCase(), Value = nameof(AudioContentType.Music) }, new ComboboxItem{ Text = nameof(AudioContentType.AudioBook).SplitCamelCase(), Value = nameof(AudioContentType.AudioBook) }, new ComboboxItem{ Text = nameof(AudioContentType.LivePerformance).SplitCamelCase(), Value = nameof(AudioContentType.LivePerformance) }, new ComboboxItem{ Text = nameof(AudioContentType.Interview).SplitCamelCase(), Value = nameof(AudioContentType.Interview) }, new ComboboxItem{ Text = nameof(AudioContentType.Cover).SplitCamelCase(), Value = nameof(AudioContentType.Cover) }, new ComboboxItem{ Text = nameof(AudioContentType.Remix).SplitCamelCase(), Value = nameof(AudioContentType.Remix) }, new ComboboxItem{ Text = nameof(AudioContentType.Soundeffect).SplitCamelCase(), Value = nameof(AudioContentType.Soundeffect) }, new ComboboxItem{ Text = nameof(AudioContentType.Podcast).SplitCamelCase(), Value = nameof(AudioContentType.Podcast) }, new ComboboxItem{ Text = nameof(AudioContentType.RadioShow).SplitCamelCase(), Value = nameof(AudioContentType.RadioShow) }, new ComboboxItem{ Text = nameof(LibraryType.VisualContent).SplitCamelCase(), IsEnabled = false }, new ComboboxItem{ Text = nameof(VisualContentType.PhotoAlbum).SplitCamelCase(), Value = nameof(VisualContentType.PhotoAlbum) }, new ComboboxItem{ Text = nameof(LibraryType.MiscellaneousContent).SplitCamelCase(), IsEnabled = false }, new ComboboxItem{ Text = nameof(MiscellaneousContentType.Other).SplitCamelCase(), Value = nameof(MiscellaneousContentType.Other) }, }; private ComboboxItem? selectedValue; private ComboboxItem? selectedValue2; private bool isSaving = false; private bool isCancelling = false; private async Task SaveData() { isSaving = true; // Perform save operation isSaving = false; Console.WriteLine("saved"); await Task.CompletedTask; } private async Task CancelOperation() { isCancelling = true; // Perform cancel operation if (!isCancelling) isCancelling = false; selectedValue2 = new ComboboxItem(); if (selectedValue2 is not null) Console.WriteLine("cancelled"); await Task.CompletedTask; } private List tableData = new List { new TableItem { Column1 = "Value 1", Column2 = "Value 2", Directories = new List() }, new TableItem { Column1 = "Value 3", Column2 = "Value 4", Directories = new List() } }; public class TableItem { public string? Column1 { get; set; } public string? Column2 { get; set; } public List? Directories { get; set; } } }