import { jsx } from "react/jsx-runtime";
import { useState } from "react";
import Tags, { tagsActionHelper } from "./Tags.js";
const useTags = (tags) => {
  const [ctags, setCtags] = useState(tags);
  const onAction = tagsActionHelper(ctags, (ts) => setCtags(ts));
  return (props) => /* @__PURE__ */ jsx(Tags, { onAction, ...props, tags: ctags });
};
export {
  useTags
};
