'use strict';

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var React = require('react');
var neetoAtoms = require('@bigbinary/neeto-atoms');
var injectCss = require('../inject-css-B6qYtOJe.js');
var jsxRuntime = require('react/jsx-runtime');

var css = ".nv-pageloader-spinner{animation:nv-pageloader-anim1 .8s linear infinite alternate,nv-pageloader-anim2 1.6s linear infinite;aspect-ratio:1;border:5px solid var(--primary);border-radius:50%;width:36px}@keyframes nv-pageloader-anim1{0%{clip-path:polygon(50% 50%,0 0,50% 0,50% 0,50% 0,50% 0,50% 0)}12.5%{clip-path:polygon(50% 50%,0 0,50% 0,100% 0,100% 0,100% 0,100% 0)}25%{clip-path:polygon(50% 50%,0 0,50% 0,100% 0,100% 100%,100% 100%,100% 100%)}50%{clip-path:polygon(50% 50%,0 0,50% 0,100% 0,100% 100%,50% 100%,0 100%)}62.5%{clip-path:polygon(50% 50%,100% 0,100% 0,100% 0,100% 100%,50% 100%,0 100%)}75%{clip-path:polygon(50% 50%,100% 100%,100% 100%,100% 100%,100% 100%,50% 100%,0 100%)}to{clip-path:polygon(50% 50%,50% 100%,50% 100%,50% 100%,50% 100%,50% 100%,0 100%)}}@keyframes nv-pageloader-anim2{0%{transform:scaleY(1) rotate(0deg)}49.99%{transform:scaleY(1) rotate(135deg)}50%{transform:scaleY(-1) rotate(0deg)}to{transform:scaleY(-1) rotate(-135deg)}}";
injectCss.n(css,{});

var _excluded = ["text"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var PageLoader = function PageLoader(_ref) {
  var _ref$text = _ref.text,
    text = _ref$text === void 0 ? "" : _ref$text,
    otherProps = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
    className: "relative box-border h-full w-full [&_*]:box-border"
  }, otherProps), {}, {
    children: /*#__PURE__*/jsxRuntime.jsxs("div", {
      className: "inset-inline-start-0 absolute top-0 flex h-full w-full flex-col items-center justify-center",
      children: [/*#__PURE__*/jsxRuntime.jsx("div", {
        className: "relative mb-4 flex shrink-0 items-center justify-center p-2",
        "data-testid": "neeto-molecules-pageloader",
        children: /*#__PURE__*/jsxRuntime.jsx("div", {
          className: "nv-pageloader-spinner"
        })
      }), text && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
        variant: "h5",
        weight: "semibold",
        children: text
      })]
    })
  }));
};
var index = /*#__PURE__*/React.memo(PageLoader);

module.exports = index;
//# sourceMappingURL=PageLoader.js.map
