using Titano.App.Settings;
using Titano.Core.Localization;
using Titano.Ui.Mvvm;
namespace Titano.App.Import;
/// A session of the plan with its editable title (the sequence title; empty keeps the folder name).
public sealed class ImportSessionRowViewModel : ObservableObject
{
public ImportSessionRowViewModel(PlanSessionRow row, Action titleChanged)
{
Row = row;
Title = new EditableField(row.Title ?? string.Empty, _ => null, text => titleChanged(row.SessionKey, text), () => Loc.L("Tooltips.Import.SessionTitle"));
}
public PlanSessionRow Row { get; }
public EditableField Title { get; }
public string Placeholder => Row.DefaultTitle;
}