import { flags } from '@heroku-cli/command';
import { Args } from '@oclif/core';
import tsheredoc from 'tsheredoc';
import { booleanConverter, PGSettingsCommand } from '../../../../lib/pg/setter.js';
import { nls } from '../../../../nls.js';
const heredoc = tsheredoc.default;
export default class AutoExplainLogVerbose extends PGSettingsCommand {
    static topic = 'pg';
    static description = heredoc(`Include verbose details in execution plans.
    This is equivalent to calling EXPLAIN VERBOSE.`);
    static flags = {
        app: flags.app({ required: true }),
        remote: flags.remote(),
    };
    static args = {
        database: Args.string({ description: `${nls('pg:database:arg:description')} ${nls('pg:database:arg:description:default:suffix')}` }),
        value: Args.string({ description: 'boolean indicating if the database has verbose execution plan logging enabled' }),
    };
    settingKey = 'auto_explain.log_verbose';
    explain(setting) {
        if (setting.value) {
            return 'Verbose execution plan logging has been enabled for auto_explain.';
        }
        return 'Verbose execution plan logging has been disabled for auto_explain.';
    }
    convertValue(val) {
        return booleanConverter(val);
    }
}
