{
  "name": "AlertDialog",
  "category": "Overlay",
  "subcategory": null,
  "description": "Modal confirmation dialog that interrupts the user for destructive actions.",
  "thumbnail": "/preview-cards/alert-dialog.png",
  "hasDocsPage": true,
  "nugetPackage": "Lumeo",
  "files": [
    "UI/AlertDialog/AlertDialog.razor",
    "UI/AlertDialog/AlertDialogAction.razor",
    "UI/AlertDialog/AlertDialogCancel.razor",
    "UI/AlertDialog/AlertDialogContent.razor",
    "UI/AlertDialog/AlertDialogDescription.razor",
    "UI/AlertDialog/AlertDialogFooter.razor",
    "UI/AlertDialog/AlertDialogHeader.razor",
    "UI/AlertDialog/AlertDialogTitle.razor",
    "UI/AlertDialog/AlertDialogTrigger.razor"
  ],
  "dependencies": [
    "spinner"
  ],
  "packageDependencies": [],
  "cssVars": [
    "--color-accent",
    "--color-accent-foreground",
    "--color-background",
    "--color-destructive",
    "--color-destructive-foreground",
    "--color-input",
    "--color-muted",
    "--color-muted-foreground",
    "--radius"
  ],
  "api": {
    "name": "AlertDialog",
    "category": "Overlay",
    "subcategory": null,
    "description": "Modal confirmation dialog that interrupts the user for destructive actions.",
    "nugetPackage": "Lumeo",
    "files": [
      "UI/AlertDialog/AlertDialog.razor",
      "UI/AlertDialog/AlertDialogAction.razor",
      "UI/AlertDialog/AlertDialogCancel.razor",
      "UI/AlertDialog/AlertDialogContent.razor",
      "UI/AlertDialog/AlertDialogDescription.razor",
      "UI/AlertDialog/AlertDialogFooter.razor",
      "UI/AlertDialog/AlertDialogHeader.razor",
      "UI/AlertDialog/AlertDialogTitle.razor",
      "UI/AlertDialog/AlertDialogTrigger.razor"
    ],
    "namespace": "Lumeo",
    "inheritsFrom": null,
    "implements": [],
    "parameters": [
      {
        "name": "ChildContent",
        "type": "RenderFragment?",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "Open",
        "type": "bool",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "OpenChanged",
        "type": "EventCallback<bool>",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "IsOpen",
        "type": "bool",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      },
      {
        "name": "IsOpenChanged",
        "type": "EventCallback<bool>",
        "default": null,
        "description": null,
        "isCascading": false,
        "captureUnmatched": false
      }
    ],
    "events": [
      {
        "name": "OpenChanged",
        "type": "EventCallback<bool>",
        "description": null
      },
      {
        "name": "IsOpenChanged",
        "type": "EventCallback<bool>",
        "description": null
      }
    ],
    "enums": [],
    "records": [
      {
        "name": "AlertDialogContext",
        "signature": "AlertDialogContext(bool IsOpen, EventCallback<bool> SetOpen, string TitleId, string DescriptionId)",
        "description": null
      }
    ],
    "cssVars": [
      "--color-accent",
      "--color-accent-foreground",
      "--color-background",
      "--color-destructive",
      "--color-destructive-foreground",
      "--color-input",
      "--color-muted",
      "--color-muted-foreground",
      "--radius"
    ],
    "examples": [
      {
        "title": "Default",
        "code": "<AlertDialog @bind-Open=\"_isOpen\">\n    <AlertDialogTrigger>\n        <Button Variant=\"Button.ButtonVariant.Outline\">Delete Account</Button>\n    </AlertDialogTrigger>\n    <AlertDialogContent>\n        <AlertDialogHeader>\n            <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n            <AlertDialogDescription>\n                This action cannot be undone. This will permanently delete your account\n                and remove your data from our servers.\n            </AlertDialogDescription>\n        </AlertDialogHeader>\n        <AlertDialogFooter>\n            <AlertDialogCancel>Cancel</AlertDialogCancel>\n            <AlertDialogAction>Continue</AlertDialogAction>\n        </AlertDialogFooter>\n    </AlertDialogContent>\n</AlertDialog>\n\n@code {\n    private bool _isOpen;\n}"
      },
      {
        "title": "With Action Handler",
        "code": "<AlertDialog @bind-Open=\"_isOpen\">\n    <AlertDialogTrigger>\n        <Button Variant=\"Button.ButtonVariant.Destructive\">Remove Item</Button>\n    </AlertDialogTrigger>\n    <AlertDialogContent>\n        <AlertDialogHeader>\n            <AlertDialogTitle>Remove this item?</AlertDialogTitle>\n            <AlertDialogDescription>\n                This item will be permanently removed from your collection.\n            </AlertDialogDescription>\n        </AlertDialogHeader>\n        <AlertDialogFooter>\n            <AlertDialogCancel>Keep It</AlertDialogCancel>\n            <AlertDialogAction OnAction=\"HandleRemove\">Yes, Remove</AlertDialogAction>\n        </AlertDialogFooter>\n    </AlertDialogContent>\n</AlertDialog>\n\n@code {\n    private bool _isOpen;\n    private void HandleRemove() { /* handle removal */ }\n}"
      },
      {
        "title": "Unsaved Changes",
        "code": "<AlertDialog @bind-Open=\"_isOpen\">\n    <AlertDialogTrigger>\n        <Button Variant=\"Button.ButtonVariant.Ghost\">\n            <Blazicon Svg=\"Lucide.X\" class=\"h-4 w-4\" /> Close Editor\n        </Button>\n    </AlertDialogTrigger>\n    <AlertDialogContent>\n        <AlertDialogHeader>\n            <AlertDialogTitle>Discard unsaved changes?</AlertDialogTitle>\n            <AlertDialogDescription>\n                You have unsaved changes. If you close now, your changes will be lost.\n            </AlertDialogDescription>\n        </AlertDialogHeader>\n        <AlertDialogFooter>\n            <AlertDialogCancel>Keep Editing</AlertDialogCancel>\n            <AlertDialogAction>Discard Changes</AlertDialogAction>\n        </AlertDialogFooter>\n    </AlertDialogContent>\n</AlertDialog>"
      },
      {
        "title": "Loading Action",
        "code": "<AlertDialog @bind-Open=\"_loadingDialogOpen\">\n    <AlertDialogTrigger>\n        <Button Variant=\"Button.ButtonVariant.Destructive\">Delete Account</Button>\n    </AlertDialogTrigger>\n    <AlertDialogContent>\n        <AlertDialogHeader>\n            <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n            <AlertDialogDescription>This action cannot be undone. This will permanently delete your account.</AlertDialogDescription>\n        </AlertDialogHeader>\n        <AlertDialogFooter>\n            <AlertDialogCancel>Cancel</AlertDialogCancel>\n            <AlertDialogAction IsLoading=\"@_isDeleting\" OnAction=\"HandleDelete\">\n                @(_isDeleting ? \"Deleting...\" : \"Delete\")\n            </AlertDialogAction>\n        </AlertDialogFooter>\n    </AlertDialogContent>\n</AlertDialog>\n\n@code {\n    private bool _loadingDialogOpen;\n    private bool _isDeleting;\n\n    private async Task HandleDelete()\n    {\n        _isDeleting = true;\n        await Task.Delay(2000);\n        _isDeleting = false;\n        _loadingDialogOpen = false;\n    }\n}"
      }
    ],
    "subComponents": {
      "AlertDialogAction": {
        "componentName": "AlertDialogAction",
        "fileName": "AlertDialogAction.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [],
        "parameters": [
          {
            "name": "Context",
            "type": "AlertDialog.AlertDialogContext",
            "default": "default!",
            "description": null,
            "isCascading": true,
            "captureUnmatched": false
          },
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "OnAction",
            "type": "EventCallback",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "IsLoading",
            "type": "bool",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [
          {
            "name": "OnAction",
            "type": "EventCallback",
            "description": null
          }
        ],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      },
      "AlertDialogCancel": {
        "componentName": "AlertDialogCancel",
        "fileName": "AlertDialogCancel.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [],
        "parameters": [
          {
            "name": "Context",
            "type": "AlertDialog.AlertDialogContext",
            "default": "default!",
            "description": null,
            "isCascading": true,
            "captureUnmatched": false
          },
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      },
      "AlertDialogContent": {
        "componentName": "AlertDialogContent",
        "fileName": "AlertDialogContent.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [
          "IAsyncDisposable"
        ],
        "parameters": [
          {
            "name": "Context",
            "type": "AlertDialog.AlertDialogContext",
            "default": "default!",
            "description": null,
            "isCascading": true,
            "captureUnmatched": false
          },
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      },
      "AlertDialogDescription": {
        "componentName": "AlertDialogDescription",
        "fileName": "AlertDialogDescription.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [],
        "parameters": [
          {
            "name": "Context",
            "type": "AlertDialog.AlertDialogContext",
            "default": "default!",
            "description": null,
            "isCascading": true,
            "captureUnmatched": false
          },
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      },
      "AlertDialogFooter": {
        "componentName": "AlertDialogFooter",
        "fileName": "AlertDialogFooter.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [],
        "parameters": [
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      },
      "AlertDialogHeader": {
        "componentName": "AlertDialogHeader",
        "fileName": "AlertDialogHeader.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [],
        "parameters": [
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      },
      "AlertDialogTitle": {
        "componentName": "AlertDialogTitle",
        "fileName": "AlertDialogTitle.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [],
        "parameters": [
          {
            "name": "Context",
            "type": "AlertDialog.AlertDialogContext",
            "default": "default!",
            "description": null,
            "isCascading": true,
            "captureUnmatched": false
          },
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      },
      "AlertDialogTrigger": {
        "componentName": "AlertDialogTrigger",
        "fileName": "AlertDialogTrigger.razor",
        "namespace": "Lumeo",
        "inheritsFrom": null,
        "implements": [],
        "parameters": [
          {
            "name": "Context",
            "type": "AlertDialog.AlertDialogContext",
            "default": "default!",
            "description": null,
            "isCascading": true,
            "captureUnmatched": false
          },
          {
            "name": "ChildContent",
            "type": "RenderFragment?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "Class",
            "type": "string?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": false
          },
          {
            "name": "AdditionalAttributes",
            "type": "Dictionary<string, object>?",
            "default": null,
            "description": null,
            "isCascading": false,
            "captureUnmatched": true
          }
        ],
        "events": [],
        "enums": [],
        "records": [],
        "parseFailed": false,
        "parseError": null
      }
    },
    "parseFailed": false,
    "parseError": null
  },
  "$schema": "https://lumeo.nativ.sh/registry-component-schema.json",
  "key": "alert-dialog",
  "docsUrl": "https://lumeo.nativ.sh/components/alert-dialog",
  "sourceUrl": [
    {
      "file": "UI/AlertDialog/AlertDialog.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialog.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogAction.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogAction.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogCancel.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogCancel.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogContent.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogContent.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogDescription.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogDescription.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogFooter.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogFooter.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogHeader.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogHeader.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogTitle.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogTitle.razor"
    },
    {
      "file": "UI/AlertDialog/AlertDialogTrigger.razor",
      "url": "https://github.com/Brain2k-0005/Lumeo/tree/master/src/Lumeo/UI/AlertDialog/AlertDialogTrigger.razor"
    }
  ],
  "source": [
    {
      "path": "UI/AlertDialog/AlertDialog.razor",
      "content": "@namespace Lumeo\n\n@{\n    var context = new AlertDialogContext(Open, EventCallback.Factory.Create<bool>(this, SetOpen), _titleId, _descriptionId);\n}\n\n<CascadingValue Value=\"context\" IsFixed=\"false\">\n    @ChildContent\n</CascadingValue>\n\n@code {\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public bool Open { get; set; }\n    [Parameter] public EventCallback<bool> OpenChanged { get; set; }\n\n    [Obsolete(\"Use Open instead. IsOpen will be removed in a future release.\")]\n    [Parameter] public bool IsOpen { get => Open; set => Open = value; }\n\n    [Obsolete(\"Use OpenChanged instead. IsOpenChanged will be removed in a future release.\")]\n    [Parameter] public EventCallback<bool> IsOpenChanged { get => OpenChanged; set => OpenChanged = value; }\n\n    private readonly string _titleId = $\"alertdialog-title-{Guid.NewGuid():N}\";\n    private readonly string _descriptionId = $\"alertdialog-desc-{Guid.NewGuid():N}\";\n\n    private async Task SetOpen(bool value)\n    {\n        Open = value;\n        await OpenChanged.InvokeAsync(value);\n    }\n\n    public record AlertDialogContext(bool IsOpen, EventCallback<bool> SetOpen, string TitleId, string DescriptionId);\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogAction.razor",
      "content": "@namespace Lumeo\n\n<button class=\"@CssClass\" disabled=\"@IsLoading\" @onclick=\"DoAction\" @attributes=\"AdditionalAttributes\">\n    @if (IsLoading)\n    {\n        <Spinner Class=\"h-4 w-4 mr-2\" />\n    }\n    @ChildContent\n</button>\n\n@code {\n    [CascadingParameter] public AlertDialog.AlertDialogContext Context { get; set; } = default!;\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public EventCallback OnAction { get; set; }\n    [Parameter] public bool IsLoading { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass => $\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none bg-destructive text-destructive-foreground shadow hover:bg-destructive/90 h-9 px-4 py-2 disabled:pointer-events-none disabled:opacity-50 {Class}\".Trim();\n\n    private async Task DoAction()\n    {\n        await OnAction.InvokeAsync();\n        if (!IsLoading)\n        {\n            await Context.SetOpen.InvokeAsync(false);\n        }\n    }\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogCancel.razor",
      "content": "@namespace Lumeo\n\n<button class=\"@CssClass\" @onclick=\"Cancel\" @attributes=\"AdditionalAttributes\">\n    @ChildContent\n</button>\n\n@code {\n    [CascadingParameter] public AlertDialog.AlertDialogContext Context { get; set; } = default!;\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass => $\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 mt-2 sm:mt-0 {Class}\".Trim();\n\n    private async Task Cancel() => await Context.SetOpen.InvokeAsync(false);\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogContent.razor",
      "content": "@namespace Lumeo\n@implements IAsyncDisposable\n\n@if (Context.IsOpen)\n{\n    <div class=\"fixed inset-0 z-50 flex items-center justify-center\">\n        <div class=\"fixed inset-0 bg-black/80 animate-fade-in\"></div>\n        <div id=\"@_contentId\" class=\"@CssClass\" role=\"alertdialog\" aria-modal=\"true\" aria-labelledby=\"@Context.TitleId\" aria-describedby=\"@Context.DescriptionId\" @onkeydown=\"HandleKeyDown\" tabindex=\"-1\" @attributes=\"AdditionalAttributes\">\n            @ChildContent\n        </div>\n    </div>\n}\n\n@inject ComponentInteropService Interop\n\n@code {\n    [CascadingParameter] public AlertDialog.AlertDialogContext Context { get; set; } = default!;\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private readonly string _contentId = $\"alertdialog-{Guid.NewGuid():N}\";\n    private bool _wasOpen;\n\n    private string CssClass => $\"relative z-50 grid w-full max-w-lg gap-4 bg-background p-6 shadow-lg animate-zoom-in sm:rounded-lg {Class}\".Trim();\n\n    protected override async Task OnAfterRenderAsync(bool firstRender)\n    {\n        if (Context.IsOpen && !_wasOpen)\n        {\n            await Interop.LockScroll();\n            await Interop.SetupFocusTrap(_contentId);\n            _wasOpen = true;\n        }\n        else if (!Context.IsOpen && _wasOpen)\n        {\n            await Cleanup();\n            _wasOpen = false;\n        }\n    }\n\n    private async Task HandleKeyDown(KeyboardEventArgs e)\n    {\n        if (e.Key == \"Escape\")\n        {\n            await Context.SetOpen.InvokeAsync(false);\n        }\n    }\n\n    private async Task Cleanup()\n    {\n        try\n        {\n            await Interop.RemoveFocusTrap(_contentId);\n            await Interop.UnlockScroll();\n        }\n        catch (JSDisconnectedException) { }\n    }\n\n    public async ValueTask DisposeAsync()\n    {\n        if (_wasOpen)\n        {\n            await Cleanup();\n        }\n    }\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogDescription.razor",
      "content": "@namespace Lumeo\n\n<p id=\"@Context.DescriptionId\" class=\"@CssClass\" @attributes=\"AdditionalAttributes\">\n    @ChildContent\n</p>\n\n@code {\n    [CascadingParameter] public AlertDialog.AlertDialogContext Context { get; set; } = default!;\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass => $\"text-sm text-muted-foreground {Class}\".Trim();\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogFooter.razor",
      "content": "@namespace Lumeo\n\n<div class=\"@CssClass\" @attributes=\"AdditionalAttributes\">\n    @ChildContent\n</div>\n\n@code {\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass => $\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 {Class}\".Trim();\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogHeader.razor",
      "content": "@namespace Lumeo\n\n<div class=\"@CssClass\" @attributes=\"AdditionalAttributes\">\n    @ChildContent\n</div>\n\n@code {\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass => $\"flex flex-col space-y-2 text-center sm:text-left {Class}\".Trim();\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogTitle.razor",
      "content": "@namespace Lumeo\n\n<h2 id=\"@Context.TitleId\" class=\"@CssClass\" @attributes=\"AdditionalAttributes\">\n    @ChildContent\n</h2>\n\n@code {\n    [CascadingParameter] public AlertDialog.AlertDialogContext Context { get; set; } = default!;\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass => $\"text-lg font-semibold {Class}\".Trim();\n}\n"
    },
    {
      "path": "UI/AlertDialog/AlertDialogTrigger.razor",
      "content": "@namespace Lumeo\n\n<div class=\"@CssClass\" @onclick=\"Open\" @attributes=\"AdditionalAttributes\">\n    @ChildContent\n</div>\n\n@code {\n    [CascadingParameter] public AlertDialog.AlertDialogContext Context { get; set; } = default!;\n    [Parameter] public RenderFragment? ChildContent { get; set; }\n    [Parameter] public string? Class { get; set; }\n    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }\n\n    private string CssClass => $\"inline-flex {Class}\".Trim();\n\n    private async Task Open() => await Context.SetOpen.InvokeAsync(true);\n}\n"
    }
  ],
  "slots": [
    {
      "name": "ChildContent",
      "owner": "AlertDialog",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogAction",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogCancel",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogContent",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogDescription",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogFooter",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogHeader",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogTitle",
      "type": "RenderFragment?",
      "description": null
    },
    {
      "name": "ChildContent",
      "owner": "AlertDialogTrigger",
      "type": "RenderFragment?",
      "description": null
    }
  ],
  "serviceDependencies": [
    {
      "service": "ComponentInteropService",
      "namespace": ""
    }
  ],
  "cascadingDependencies": [
    {
      "name": "Context",
      "type": "AlertDialog.AlertDialogContext",
      "required": true
    }
  ],
  "relatedComponents": [
    {
      "name": "AlertDialogAction",
      "reason": "sub-component"
    },
    {
      "name": "AlertDialogCancel",
      "reason": "sub-component"
    },
    {
      "name": "AlertDialogContent",
      "reason": "sub-component"
    },
    {
      "name": "AlertDialogDescription",
      "reason": "sub-component"
    },
    {
      "name": "AlertDialogFooter",
      "reason": "sub-component"
    },
    {
      "name": "AlertDialogHeader",
      "reason": "sub-component"
    },
    {
      "name": "AlertDialogTitle",
      "reason": "sub-component"
    },
    {
      "name": "AlertDialogTrigger",
      "reason": "sub-component"
    },
    {
      "name": "Spinner",
      "reason": "used internally"
    }
  ],
  "keyboardInteractions": [
    {
      "key": "Escape",
      "action": "HandleKeyDown handles Escape in AlertDialogContent.razor"
    }
  ],
  "tests": [
    "tests/Lumeo.Tests/Components/AlertDialog/AlertDialogTests.cs",
    "tests/Lumeo.Tests/Contract/ComponentContractTests.cs"
  ],
  "mdSummary": "# AlertDialog\n\nModal confirmation dialog that interrupts the user for destructive actions.\n\n**Package:** `Lumeo` · **Category:** Overlay\n**Docs:** https://lumeo.nativ.sh/components/alert-dialog\n\n## Parameters\n| Owner | Name | Type | Default | Description |\n|---|---|---|---|---|\n| AlertDialog | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialog | Open | `bool` | `` |  |\n| AlertDialog | OpenChanged | `EventCallback<bool>` | `` |  |\n| AlertDialog | IsOpen | `bool` | `` |  |\n| AlertDialog | IsOpenChanged | `EventCallback<bool>` | `` |  |\n| AlertDialogAction | Context | `AlertDialog.AlertDialogContext` | `default!` |  |\n| AlertDialogAction | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogAction | OnAction | `EventCallback` | `` |  |\n| AlertDialogAction | IsLoading | `bool` | `` |  |\n| AlertDialogAction | Class | `string?` | `` |  |\n| AlertDialogAction | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n| AlertDialogCancel | Context | `AlertDialog.AlertDialogContext` | `default!` |  |\n| AlertDialogCancel | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogCancel | Class | `string?` | `` |  |\n| AlertDialogCancel | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n| AlertDialogContent | Context | `AlertDialog.AlertDialogContext` | `default!` |  |\n| AlertDialogContent | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogContent | Class | `string?` | `` |  |\n| AlertDialogContent | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n| AlertDialogDescription | Context | `AlertDialog.AlertDialogContext` | `default!` |  |\n| AlertDialogDescription | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogDescription | Class | `string?` | `` |  |\n| AlertDialogDescription | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n| AlertDialogFooter | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogFooter | Class | `string?` | `` |  |\n| AlertDialogFooter | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n| AlertDialogHeader | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogHeader | Class | `string?` | `` |  |\n| AlertDialogHeader | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n| AlertDialogTitle | Context | `AlertDialog.AlertDialogContext` | `default!` |  |\n| AlertDialogTitle | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogTitle | Class | `string?` | `` |  |\n| AlertDialogTitle | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n| AlertDialogTrigger | Context | `AlertDialog.AlertDialogContext` | `default!` |  |\n| AlertDialogTrigger | ChildContent | `RenderFragment?` | `` |  |\n| AlertDialogTrigger | Class | `string?` | `` |  |\n| AlertDialogTrigger | AdditionalAttributes | `Dictionary<string, object>?` | `` |  |\n\n## Slots\n- `ChildContent` (AlertDialog) — RenderFragment slot\n- `ChildContent` (AlertDialogAction) — RenderFragment slot\n- `ChildContent` (AlertDialogCancel) — RenderFragment slot\n- `ChildContent` (AlertDialogContent) — RenderFragment slot\n- `ChildContent` (AlertDialogDescription) — RenderFragment slot\n- `ChildContent` (AlertDialogFooter) — RenderFragment slot\n- `ChildContent` (AlertDialogHeader) — RenderFragment slot\n- `ChildContent` (AlertDialogTitle) — RenderFragment slot\n- `ChildContent` (AlertDialogTrigger) — RenderFragment slot\n\n## Events\n- `OpenChanged` (`EventCallback<bool>`)\n- `IsOpenChanged` (`EventCallback<bool>`)\n\n## Sub-components\n- `AlertDialogAction`, `AlertDialogCancel`, `AlertDialogContent`, `AlertDialogDescription`, `AlertDialogFooter`, `AlertDialogHeader`, `AlertDialogTitle`, `AlertDialogTrigger`\n\n## Cascading values it expects\n- `Context` (`AlertDialog.AlertDialogContext`)\n\n## Services it injects\n- `ComponentInteropService` ()\n\n## Keyboard\n- `Escape` — HandleKeyDown handles Escape in AlertDialogContent.razor\n\n## Example\n```razor\n<AlertDialog />\n```\n\n## CSS variables\n`--color-accent`, `--color-accent-foreground`, `--color-background`, `--color-destructive`, `--color-destructive-foreground`, `--color-input`, `--color-muted`, `--color-muted-foreground`, `--radius`\n\n## Files\n- `UI/AlertDialog/AlertDialog.razor`\n- `UI/AlertDialog/AlertDialogAction.razor`\n- `UI/AlertDialog/AlertDialogCancel.razor`\n- `UI/AlertDialog/AlertDialogContent.razor`\n- `UI/AlertDialog/AlertDialogDescription.razor`\n- `UI/AlertDialog/AlertDialogFooter.razor`\n- `UI/AlertDialog/AlertDialogHeader.razor`\n- `UI/AlertDialog/AlertDialogTitle.razor`\n- `UI/AlertDialog/AlertDialogTrigger.razor`\n"
}