import '../../../../../globals.js';
import { combineOptions } from '../../../../../phet-core/js/optionize.js';
import { alpenglow, DIRECT_MODULE_DEFAULTS, DirectModule, MAIN_HISTOGRAM_DEFAULTS, mainHistogramWGSL } from '../../../imports.js';
export const HISTOGRAM_MODULE_DEFAULTS = {
    // eslint-disable-next-line phet/no-object-spread-on-non-literals
    ...DIRECT_MODULE_DEFAULTS,
    // eslint-disable-next-line phet/no-object-spread-on-non-literals
    ...MAIN_HISTOGRAM_DEFAULTS
};
// inputSize: number
export default class HistogramModule extends DirectModule {
    constructor(providedOptions) {
        const options = combineOptions({
            main: mainHistogramWGSL(providedOptions),
            setDispatchSize: (dispatchSize, inputSize) => {
                dispatchSize.x = Math.ceil(inputSize / (providedOptions.workgroupSize * providedOptions.grainSize));
            }
        }, providedOptions);
        super(options);
        this.input = options.input;
        this.output = options.output;
    }
}
alpenglow.register('HistogramModule', HistogramModule);
//# sourceMappingURL=HistogramModule.js.map