"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _theme = require("../../contexts/theme");
var _testable = require("../../utils/testable");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const RecordLoading = () => {
  const {
    ColorPallet
  } = (0, _theme.useTheme)();
  const rowFadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
  const fadeTiming = {
    toValue: 0.2,
    duration: 1100,
    useNativeDriver: true
  };
  const style = _reactNative.StyleSheet.create({
    container: {
      flexDirection: 'column'
    },
    rectangle: {
      backgroundColor: ColorPallet.grayscale.veryLightGrey,
      height: 30,
      marginVertical: 10
    },
    line: {
      backgroundColor: ColorPallet.grayscale.lightGrey,
      height: 1,
      marginVertical: 5
    }
  });
  (0, _react.useEffect)(() => {
    _reactNative.Animated.loop(_reactNative.Animated.timing(rowFadeAnim, fadeTiming)).start();
  }, []);
  const makeARow = () => {
    return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
      style: {
        flexDirection: 'column'
      }
    }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
      style: [style.rectangle, {
        width: '35%'
      }]
    }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
      style: [style.rectangle, {
        width: '85%'
      }]
    }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
      style: style.line
    }));
  };
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: [style.container],
    testID: (0, _testable.testIdWithKey)('RecordLoading')
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
    style: [{
      opacity: rowFadeAnim
    }]
  }, makeARow(), makeARow()));
};
var _default = RecordLoading;
exports.default = _default;
//# sourceMappingURL=RecordLoading.js.map