namespace NotesDataAnalyst; public partial class LinkInputPopup : ContentPage { public event Action? LinkSubmitted; public LinkInputPopup() { InitializeComponent(); } private void OnAddButtonClicked(object sender, EventArgs e) { string url = urlEntry.Text; if (!string.IsNullOrEmpty(url)) { LinkSubmitted?.Invoke(url); // Передача введенной ссылки обратно ClosePopup(); } } private void OnCancelButtonClicked(object sender, EventArgs e) { ClosePopup(); } private void ClosePopup() { // Закрытие окна (имитируем поведение Popup) Application.Current.MainPage.Navigation.PopModalAsync(); } }