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

export def provisioning_options [
    source: string
] {
    let provisioning_name = (get-provisioning-name)
    let provisioning_base = (get-config-base-path)
    let provisioning_url = (get-provisioning-url)

    (
        $"(_ansi blue_bold)($provisioning_name) server ($source)(_ansi reset) options:\n"  +
        $"(_ansi blue)($provisioning_name)(_ansi reset) sed          - to edit content from a SOPS file\n" +
        $"(_ansi blue)($provisioning_name)(_ansi reset) sed          - to edit content from a SOPS file\n" +
        $"(_ansi blue)($provisioning_name)(_ansi reset) cache        - to view with PROVISIONING_FILEVIEWER server provider settings cache \n" +
            $"(_ansi blue)($provisioning_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)($provisioning_name)(_ansi reset) cost [host]  - Get [cost | price] for [all | host] servers \n" +
        $"(_ansi blue)($provisioning_name)(_ansi reset) nu           - to run a nushell in ($provisioning_base) path\n" +
        $"(_ansi blue)($provisioning_name)(_ansi reset) qr           - to get ($provisioning_url) QR code"
    )
}
