'use strict';

// AquonSamplesMenu is now a thin facade over assetResolver.
// Backed by namespaces `monsterSamples` (sample codes, indexed by code)
// and `monsterSpecs` (sampling defaults + per-sample overrides).

const { assetResolver } = require('../registry');

class AquonSamplesMenu {
    // relPath retained for signature compatibility with the previous on-disk
    // implementation; unused — the registry owns file locations.
    constructor(/* relPath */) {}

    getAllMenuData() {
        const samples = assetResolver
            .list('monsterSamples')
            .map((id) => assetResolver.resolve('monsterSamples', id))
            .filter(Boolean);
        const specs = assetResolver.resolve('monsterSpecs', 'all') || { defaults: {}, bySample: {} };
        return {
            samples,
            specs: {
                defaults: specs.defaults || {},
                bySample: specs.bySample || {},
            },
        };
    }
}

module.exports = AquonSamplesMenu;
