"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.name = exports.apply = exports.schema = exports.__root_dir = void 0;
const path = __importStar(require("path"));
exports.__root_dir = path.join(__dirname, "../");
const koishi_1 = require("koishi");
const universalis = __importStar(require("./universalis"));
const scheduler = __importStar(require("./scheduler"));
const ffixvHouse = __importStar(require("./ffixvHouse"));
const random = __importStar(require("./random"));
const divination = __importStar(require("./divination"));
const serverStatus = __importStar(require("./serverStatus"));
const news = __importStar(require("./news"));
const reminder = __importStar(require("./reminder"));
const quest = __importStar(require("./quest"));
const item = __importStar(require("./item"));
const defaultConfig = {
    market: {
        type: 'image'
    }
};
exports.schema = koishi_1.Schema.object({
    admin: koishi_1.Schema.array(koishi_1.Schema.string()).default([]),
    market: koishi_1.Schema.object({ type: koishi_1.Schema.union(['text', 'image']) }).default({ type: 'image' })
});
function apply(ctx, options = {}) {
    options = { ...defaultConfig, ...options };
    ctx.command("ffxiv")
        .alias("ff14");
    ctx.plugin(universalis, options.market);
    ctx.plugin(scheduler);
    ctx.plugin(ffixvHouse);
    ctx.plugin(random);
    ctx.plugin(divination);
    ctx.plugin(serverStatus);
    ctx.plugin(news);
    ctx.plugin(reminder, options);
    ctx.plugin(quest);
    ctx.plugin(item);
}
exports.apply = apply;
exports.name = "ffxiv";
