import { dynamic } from "@solidjs/web";
import { omit } from "solid-js";
import { mergeRootProps } from "../internals/merge-root-props.jsx";
import { resolveClassStyle } from "../internals/resolve-class-style.jsx";
/**
 * A separator that visually or semantically divides content. Renders a
 * `<div>` element (or `as` override).
 *
 * Solid 2.0-native rewire (§1 wave 1): replaces `renderElement` with
 * `dynamic(() => props.as ?? "div")`, threading the role +
 * `aria-orientation` + `data-orientation` reactive bag through
 * `mergeRootProps`.
 */
export function Separator(props) {
  const orientation = () => props.orientation ?? "horizontal";
  const internal = {
    role: "separator",
    get "aria-orientation"() {
      return orientation();
    },
    get "data-orientation"() {
      return orientation();
    }
  };
  const userStyling = resolveClassStyle(props, () => ({
    orientation: orientation()
  }));
  const userProps = omit(props, "class", "style", "attrs", "as", "orientation");
  const styledUserProps = mergeRootProps(userStyling, userProps);
  const merged = mergeRootProps(internal, styledUserProps);
  const Tag = dynamic(() => props.as ?? "div");
  return <Tag {...merged} />;
}
//# sourceMappingURL=separator.jsx.map
