controls/secretmanager-remove-modal.ps1

function New-UDRemoveSecretManagerModal {
    
    param (
        [Parameter(Mandatory = $true)]
        $SecretManager
    )

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

            New-UDButton -Text "Confirm" -Icon check -OnClick {
                Remove-UASecretManager -SecretManager $SecretManager
                Sync-UDElement -Id "SecretsGrid" -Broadcast
                Hide-UDModal
            }
        }
    }
}