import '../../../globals.js';
// Copyright 2015-2024, University of Colorado Boulder
/**
 * Close button, red with a white 'X'.
 *
 * @author Chris Malley (PixelZoom, Inc.)
 * @author John Blanco (PhET Interactive Simulations)
 * @author Jesse Greenberg (PhET Interactive Simulations)
 */
import { Shape } from '../../../kite/js/imports.js';
import optionize from '../../../phet-core/js/optionize.js';
import { Path } from '../../../scenery/js/imports.js';
import RectangularPushButton from '../../../sun/js/buttons/RectangularPushButton.js';
import sharedSoundPlayers from '../../../tambo/js/sharedSoundPlayers.js';
import PhetColorScheme from '../PhetColorScheme.js';
import sceneryPhet from '../sceneryPhet.js';
import SceneryPhetStrings from '../SceneryPhetStrings.js';
export default class CloseButton extends RectangularPushButton {
    constructor(providedOptions) {
        const options = optionize()({
            // SelfOptions
            iconLength: 16,
            pathOptions: {
                stroke: 'white',
                lineWidth: 2.5,
                lineCap: 'round'
            },
            // RectangularPushButton options
            baseColor: PhetColorScheme.RED_COLORBLIND,
            xMargin: 4, // {number} x margin around the icon
            yMargin: 4, // {number} y margin around the icon
            // sound
            soundPlayer: sharedSoundPlayers.get('generalClose'),
            // pdom
            accessibleName: SceneryPhetStrings.a11y.closeStringProperty,
            //voicing
            voicingNameResponse: SceneryPhetStrings.a11y.closeStringProperty
        }, providedOptions);
        // 'X' icon
        const xShape = new Shape()
            .moveTo(-options.iconLength / 2, -options.iconLength / 2)
            .lineTo(options.iconLength / 2, options.iconLength / 2)
            .moveTo(options.iconLength / 2, -options.iconLength / 2)
            .lineTo(-options.iconLength / 2, options.iconLength / 2);
        options.content = new Path(xShape, options.pathOptions);
        super(options);
    }
}
sceneryPhet.register('CloseButton', CloseButton);
//# sourceMappingURL=CloseButton.js.map