import 'svelte/internal/disclose-version';
import 'svelte/internal/flags/legacy';
import * as $ from 'svelte/internal/client';
import Dialog from './Dialog.svelte';
var root = $.template(`<button>Open It!</button> <!>`, 1);
export default function App($$anchor) {
let dialog = $.mutable_state();
var fragment = root();
var button = $.first_child(fragment);
var node = $.sibling(button, 2);
Dialog(node, {
get dialog() {
return $.get(dialog);
},
set dialog($$value) {
$.set(dialog, $$value);
},
$$events: { close: () => console.log('closed') },
children: ($$anchor, $$slotProps) => {
$.next();
var text = $.text('This is amazingly simple! (press esc to close)');
$.append($$anchor, text);
},
$$slots: { default: true },
$$legacy: true
});
$.event('click', button, () => $.get(dialog).showModal());
$.append($$anchor, fragment);
}