import { useMemo as n } from "react";
function s(t, e) {
  return n(() => {
    var o;
    if (t.type) return t.type;
    let r = (o = t.as) != null ? o : "button";
    if (typeof r == "string" && r.toLowerCase() === "button" || (e == null ? void 0 : e.tagName) === "BUTTON" && !e.hasAttribute("type")) return "button";
  }, [t.type, t.as, e]);
}
export {
  s as useResolveButtonType
};
