"""Delete a secret."""

import typer

from mb_stash.cli.context import password_prompt, use_context


def delete(ctx: typer.Context, key: str) -> None:
    """Delete a secret."""
    app = use_context(ctx)
    app.core.service.delete(key, password_prompt=password_prompt)
    app.out.print_secret_deleted(key)
