import '../../../../../globals.js';
import { combineOptions } from '../../../../../phet-core/js/optionize.js';
import { alpenglow, DIRECT_MODULE_DEFAULTS, DirectModule, MAIN_MERGE_SIMPLE_DEFAULTS, mainMergeSimpleWGSL } from '../../../imports.js';
export const MERGE_SIMPLE_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_MERGE_SIMPLE_DEFAULTS
};
// outputSize: number (sum of inputASize and inputBSize)
export default class MergeSimpleModule extends DirectModule {
    constructor(providedOptions) {
        const options = combineOptions({
            main: mainMergeSimpleWGSL(providedOptions),
            setDispatchSize: (dispatchSize, outputSize) => {
                dispatchSize.x = Math.ceil(outputSize / (providedOptions.workgroupSize * providedOptions.grainSize));
            }
        }, providedOptions);
        super(options);
        this.inputA = providedOptions.inputA;
        this.inputB = providedOptions.inputB;
        this.output = providedOptions.output;
    }
}
alpenglow.register('MergeSimpleModule', MergeSimpleModule);
//# sourceMappingURL=MergeSimpleModule.js.map