/**
 * Alert-dialog handle factory — mirrors Base UI React's
 * `createAlertDialogHandle`.
 *
 * Constructs a `DialogHandle` whose store is shape-compatible with
 * `<AlertDialog.Root>`. At runtime the handle is a plain `DialogHandle`;
 * only the store's default configuration differs (modal,
 * disablePointerDismissal, role=alertdialog). In the Solid port those
 * knobs are imposed by `<AlertDialog.Root>` itself (the root forces
 * `modal: true` / `disablePointerDismissal: true` regardless of store
 * state), so the handle is a bare `DialogHandle`.
 *
 * TypeScript-only `__brand` phantom discriminator:
 *
 * The `AlertDialogHandle<Payload>` type is a nominal branding of
 * `DialogHandle<Payload>` via a `declare readonly __brand:
 * "AlertDialogHandle"` phantom property. The property does not exist at
 * runtime — it only exists in the type system — so structural assignment
 * from a plain `DialogHandle` into an `AlertDialogHandle`-typed slot is
 * rejected. Branded handles remain assignable *to* `DialogHandle`-typed
 * slots (the Dialog `Trigger` re-exported under the `AlertDialog`
 * namespace accepts this), but a `DialogHandle` created via
 * `Dialog.createHandle()` cannot be passed where an `AlertDialogHandle`
 * is required.
 */

import { DialogHandle, DialogStore } from "../dialog/store/dialog-store.jsx";

/**
 * Nominal (brand-typed) alias of `DialogHandle<Payload>` used by
 * `<AlertDialog.Root>` / `AlertDialog.createHandle`. Identical shape to
 * `DialogHandle` at runtime; the phantom `__brand` property exists only
 * in the type system so a plain `DialogHandle` cannot be passed where an
 * `AlertDialogHandle` is expected.
 */

export function createAlertDialogHandle() {
  return new DialogHandle(new DialogStore());
}
//# sourceMappingURL=handle.jsx.map
