import '../../../globals.js';
import optionize, { combineOptions } from '../../../phet-core/js/optionize.js';
import { Font, Text } from '../../../scenery/js/imports.js';
import Tandem from '../../../tandem/js/Tandem.js';
import sun from '../sun.js';
import RectangularPushButton from './RectangularPushButton.js';
export default class TextPushButton extends RectangularPushButton {
    constructor(string, providedOptions) {
        const options = optionize()({
            // TextPushButtonOptions
            font: Font.DEFAULT,
            textFill: 'black',
            maxTextWidth: null,
            // RectangularPushButtonOptions
            tandem: Tandem.REQUIRED,
            innerContent: string
        }, providedOptions);
        const text = new Text(string, combineOptions({
            font: options.font,
            fill: options.textFill,
            maxWidth: options.maxTextWidth
        }, options.textNodeOptions));
        options.content = text;
        super(options);
        this.disposeTextPushButton = () => {
            text.dispose();
        };
    }
    dispose() {
        this.disposeTextPushButton();
        super.dispose();
    }
}
sun.register('TextPushButton', TextPushButton);
//# sourceMappingURL=TextPushButton.js.map