import React from 'react';
import { ActionIcon } from './ActionIcon';
function Custom() {
  return /*#__PURE__*/React.createElement("a", {
    href: "/"
  }, "Hello");
}
test('Passing type check', function () {
  function ExpectedToPass() {
    var aRef = React.useRef(null);
    var buttonRef = React.useRef(null);
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionIcon, {
      role: "link",
      href: "#",
      "aria-label": "ok"
    }), /*#__PURE__*/React.createElement(ActionIcon, {
      role: "link",
      href: "#",
      "aria-label": "ok",
      target: "ok",
      ref: aRef
    }), /*#__PURE__*/React.createElement(ActionIcon, {
      role: "button",
      onClick: console.log,
      "aria-label": "ok"
    }), /*#__PURE__*/React.createElement(ActionIcon, {
      role: "button",
      onClick: console.log,
      "aria-labelledby": "id"
    }), /*#__PURE__*/React.createElement(ActionIcon, {
      role: "button",
      onClick: console.log,
      "aria-label": "id"
      // See type. Supports aria-label or aria-labelledby required. But as props are any type
      ,
      as: function as(p) {
        return /*#__PURE__*/React.createElement("button", null);
      }
    }), /*#__PURE__*/React.createElement(ActionIcon, {
      role: "button",
      onClick: console.log,
      "aria-label": "ok",
      ref: buttonRef
    }), /*#__PURE__*/React.createElement(ActionIcon, {
      as: Custom,
      role: "link",
      href: "#",
      "aria-label": "ok",
      ref: aRef
    }), /*#__PURE__*/React.createElement(ActionIcon, {
      as: function as(p) {
        return /*#__PURE__*/React.createElement("a", null);
      },
      role: "link",
      href: "#",
      "aria-label": "ok",
      ref: aRef
    }));
  }
  // This is a fake test, the real test is the file can be compiled/typechecked
  expect(ExpectedToPass).toBeDefined();
});

/* When working with types, uncomment in development to confirm all fail typecheck */
// function ExpectedToFail() {
//   const divRef = React.useRef<HTMLDivElement>(null)

//   return (
//     <>
//       <ActionIcon />
//       <ActionIcon role="link" />
//       <ActionIcon role="button" aria-label="wrong" />
//       <ActionIcon role="link" aria-label="wrong" href="#" ref={divRef} />
//       <ActionIcon
//         ref={divRef}
//         role="button"
//         onClick={console.log}
//         aria-label="wrong"
//       />
//     </>
//   )
// }
//# sourceMappingURL=ActionIcon.types.example.js.map