"use client";
import a, { useState as c, useCallback as r } from "react";
const l = {
  display: "none"
};
function u(e) {
  let {
    id: n,
    value: t
  } = e;
  return a.createElement("div", {
    id: n,
    style: l
  }, t);
}
function s(e) {
  let {
    id: n,
    announcement: t,
    ariaLiveType: i = "assertive"
  } = e;
  const o = {
    position: "fixed",
    top: 0,
    left: 0,
    width: 1,
    height: 1,
    margin: -1,
    border: 0,
    padding: 0,
    overflow: "hidden",
    clip: "rect(0 0 0 0)",
    clipPath: "inset(100%)",
    whiteSpace: "nowrap"
  };
  return a.createElement("div", {
    id: n,
    style: o,
    role: "status",
    "aria-live": i,
    "aria-atomic": !0
  }, t);
}
function p() {
  const [e, n] = c("");
  return {
    announce: r((i) => {
      i != null && n(i);
    }, []),
    announcement: e
  };
}
export {
  u as HiddenText,
  s as LiveRegion,
  p as useAnnouncement
};
