import n from "react";
function* i() {
  let e = 0;
  for (; ; )
    yield String(e), e = (e + 1) % 10;
}
function h(r, e) {
  class o extends n.Component {
    constructor(t) {
      super(t), this.refresh = () => {
        this.setState({ key: this.state.keygen.next().value });
      }, this.state = {
        keygen: i(),
        oldProps: t,
        key: "1"
      };
    }
    static getDerivedStateFromProps(t, s) {
      return e(s.oldProps, t) ? {
        key: s.keygen.next().value,
        oldProps: t
      } : null;
    }
    render() {
      return /* @__PURE__ */ n.createElement(r, { key: this.state.key, propsGuardRefresh: this.refresh, ...this.props }, this.props.children);
    }
  }
  return o;
}
export {
  h as w
};
