controls/identity-remove-modal.ps1

function New-UARemoveIdentityModal {
    
    param (
        [Parameter(Mandatory = $true)]
        $Identity
    )

    Show-UDModal -Content {
        New-UDPageHeader -Text ("Deleting Identity: $($Identity.Name)")
        New-UDParagraph -Text "Are you sure you wish to remove this Identity?"
                
        New-UDElement -Tag div -Attributes @{
            style = @{
                textAlign = "right"
            }
        } -Content {

            New-UDButton -Text "Confirm" -Icon check -OnClick {
                
                Remove-UAIdentity -Identity $Identity
                Sync-UDElement -Id "identity-grid" -Broadcast
                Sync-UDElement -Id "role-grid" -Broadcast
                Hide-UDModal
            }
        }
    }
}