/**
 * Copyright © 2019 Johnson & Johnson
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import React from 'react';
import './Spinner.css';
var BarsCount = 12;
var MaxDegrees = 360;
export var Spinner = function (props) {
    var bars = [];
    for (var i = 0; i < BarsCount; i += 1) {
        var barStyle = {};
        barStyle.WebkitAnimationDelay = "".concat((i - BarsCount) / 10, " s");
        barStyle.animationDelay = barStyle.WebkitAnimationDelay;
        barStyle.transform = "rotate(".concat((i * (MaxDegrees / BarsCount)), "deg) translate(146%)");
        barStyle.WebkitTransform = barStyle.transform;
        bars.push(
        // eslint-disable-next-line react/destructuring-assignment
        React.createElement("div", { style: barStyle, className: "".concat(props.color || '', " bodiless-spinner_bar"), key: i }));
    }
    return (React.createElement("div", { className: "bodiless-spinner" }, bars));
};
export var ComponentFormSpinner = function () { return (React.createElement("div", { className: "bl-pt-5" },
    React.createElement(Spinner, { color: "bl-bg-white" }))); };
export default Spinner;
//# sourceMappingURL=Spinner.js.map