import { attr, nullableNumberConverter } from '@ni/fast-element';
import { defaultMinPixelWidth, defaultFractionalWidth } from '../base/types';
// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
export function mixinFractionalWidthColumnAPI(base) {
    /**
     * The Mixin that provides a concrete column with the API to support being resized
     * proportionally within a Table.
     */
    class FractionalWidthColumn extends base {
        fractionalWidthChanged() {
            this.columnInternals.fractionalWidth = this.fractionalWidth ?? defaultFractionalWidth;
        }
        minPixelWidthChanged() {
            this.columnInternals.minPixelWidth = this.minPixelWidth ?? defaultMinPixelWidth;
        }
    }
    attr({ attribute: 'fractional-width', converter: nullableNumberConverter })(FractionalWidthColumn.prototype, 'fractionalWidth');
    attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })(FractionalWidthColumn.prototype, 'minPixelWidth');
    return FractionalWidthColumn;
}
//# sourceMappingURL=fractional-width-column.js.map