import _ from 'lodash';
import '../../../../../globals.js';
// Copyright 2024, University of Colorado Boulder
/**
 * Creates a double-headed, dashed arrow used to cue sorting in the "group sort" interaction.
 *
 * @author Marla Schulz (PhET Interactive Simulations)
 * @author Michael Kauzmann (PhET Interactive Simulations)
 */
import optionize, { combineOptions } from '../../../../../phet-core/js/optionize.js';
import { HBox, Rectangle } from '../../../../../scenery/js/imports.js';
import sceneryPhet from '../../../sceneryPhet.js';
import TriangleNode from '../../../TriangleNode.js';
export default class SortCueArrowNode extends HBox {
    constructor(providedOptions) {
        const options = optionize()({
            dashHeight: 2,
            dashWidth: 2,
            triangleNodeOptions: {},
            isDisposable: false
        }, providedOptions);
        const createArrowHead = (pointDirection) => {
            const triangleNodeOptions = combineOptions({
                pointDirection: pointDirection,
                triangleWidth: 6,
                triangleHeight: 5,
                fill: 'black'
            }, options.triangleNodeOptions);
            return new TriangleNode(triangleNodeOptions);
        };
        const dashes = [];
        _.times(options.numberOfDashes, () => {
            dashes.push(new Rectangle(0, 0, options.dashWidth, options.dashHeight, { fill: 'black' }));
        });
        const superOptions = combineOptions({
            children: [
                ...(options.doubleHead ? [createArrowHead('left')] : []),
                ...dashes,
                createArrowHead('right')
            ],
            spacing: 2
        }, providedOptions);
        super(superOptions);
    }
}
sceneryPhet.register('SortCueArrowNode', SortCueArrowNode);
//# sourceMappingURL=SortCueArrowNode.js.map