'use client';
'use strict';

var _tslib = require('../_virtual/_tslib.js');
var index = require('../external/@radix-ui/react-progress/dist/index.js');
var index$1 = require('../external/classnames/index.js');
var React = require('react');
var progress_module = require('./progress.module.css.js');

var DEFAULT_PROGRESS_VALUE = 0;
var ProgressContext = React.createContext(DEFAULT_PROGRESS_VALUE);
var Root = React.forwardRef(function ProgressRoot(_a, ref) {
    _a.className; var children = _a.children, value = _a.value, otherProps = _tslib.__rest(_a, ["className", "children", "value"]);
    return (React.createElement(ProgressContext.Provider, { value: value || DEFAULT_PROGRESS_VALUE },
        React.createElement(index.Root, _tslib.__assign({ ref: ref }, otherProps, { value: value }), children)));
});
var Indicator = React.forwardRef(function Indicator(_a, ref) {
    var className = _a.className, otherProps = _tslib.__rest(_a, ["className"]);
    var progress = React.useContext(ProgressContext);
    return (React.createElement(index.Indicator, _tslib.__assign({ className: index$1(className, progress_module.indicator), ref: ref, asChild: true, style: { transform: "translateX(-".concat(100 - progress, "%)") } }, otherProps)));
});
var Progress = { Root: Root, Indicator: Indicator };

exports.Indicator = Indicator;
exports.Progress = Progress;
exports.Root = Root;
//# sourceMappingURL=progress.js.map
