use ../lib_provisioning/config/accessor.nu *

export def provisioning_options [
    source: string
] {
    let prov_name = (get-provisioning-name)
    let base_path = (get-config-base-path)
    let prov_url = (get-provisioning-url)
    (
        $"(_ansi blue_bold)($prov_name) server ($source)(_ansi reset) options:\n"  +
        $"(_ansi blue)($prov_name)(_ansi reset) sed          - to edit content from a SOPS file \n" +
        $"(_ansi blue)($prov_name)(_ansi reset) ssh          - to config and get SSH settings for servers \n" +
            $"(_ansi blue)($prov_name)(_ansi reset) list [items] - to list items: " +
            $"[ (_ansi green)providers(_ansi reset) p | (_ansi green)tasks(_ansi reset) t | (_ansi green)services(_ansi reset) s ]\n" +
        $"(_ansi blue)($prov_name)(_ansi reset) nu           - to run a nushell in ($base_path) path\n" +
        $"(_ansi blue)($prov_name)(_ansi reset) qr           - to get ($prov_url) QR code\n"
    )
}
