"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SineWaveIcon = void 0;

var _preact = require("preact");

var _getSineWavePath = require("./utils/get-sine-wave-path");

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

const SineWaveIcon = (_ref) => {
  let {
    size = 24
  } = _ref,
      rest = _objectWithoutProperties(_ref, ["size"]);

  const path = (0, _getSineWavePath.getSineWavePath)({
    x: 0,
    y: 8,
    len: 15,
    amp: 10,
    n: 15
  });
  const stroke = 5;
  const radius = 0.75 * 30;
  return (0, _preact.h)("svg", _extends({
    width: size,
    height: size,
    viewBox: "0 0 60 16"
  }, rest), (0, _preact.h)("clipPath", {
    id: "circClip"
  }, (0, _preact.h)("circle", {
    cx: "30",
    cy: "8",
    r: radius - 2
  })), (0, _preact.h)("path", {
    id: "squiggle",
    d: path,
    style: {
      animation: "move 4s linear infinite"
    },
    fill: "transparent",
    "stroke-width": stroke
  }), (0, _preact.h)("circle", {
    cx: "30",
    cy: "8",
    r: radius - 2,
    fill: "none",
    "stroke-width": stroke,
    stroke: "currentColor"
  }), (0, _preact.h)("use", {
    clipPath: "url(#circClip)",
    href: "#squiggle",
    stroke: "currentColor"
  }));
};

exports.SineWaveIcon = SineWaveIcon;