import { ScrollAreaRootDataAttributes } from "../root/scroll-area-root-data-attributes.jsx";

/**
 * Reactive `data-*` getter bag shared by `<ScrollArea.Root>`,
 * `<ScrollArea.Viewport>`, `<ScrollArea.Content>`, and the scrollbar parts.
 * Each key is a live getter reading through the supplied `state` accessor —
 * safe to spread into `mergeRootProps` without losing reactivity.
 *
 * Mirrors `scrollAreaStateAttributesMapping` (see `../root/state-attributes-mapping.ts`):
 * `cornerHidden` is intentionally not projected. `data-scrolling` is omitted
 * because the legacy mapping never included it (the root state shape carries
 * the field but the mapping skipped it under the default projection rule that
 * `false` ⇒ no attr — present here for completeness so that `true` projects).
 *
 * Established as part of §1 wave 3 alongside `numberFieldDataAttrs` and
 * `sliderDataAttrs`.
 */
export function scrollAreaDataAttrs(state) {
  return {
    get [ScrollAreaRootDataAttributes.hasOverflowX]() {
      return state().hasOverflowX ? "" : undefined;
    },
    get [ScrollAreaRootDataAttributes.hasOverflowY]() {
      return state().hasOverflowY ? "" : undefined;
    },
    get [ScrollAreaRootDataAttributes.overflowXStart]() {
      return state().overflowXStart ? "" : undefined;
    },
    get [ScrollAreaRootDataAttributes.overflowXEnd]() {
      return state().overflowXEnd ? "" : undefined;
    },
    get [ScrollAreaRootDataAttributes.overflowYStart]() {
      return state().overflowYStart ? "" : undefined;
    },
    get [ScrollAreaRootDataAttributes.overflowYEnd]() {
      return state().overflowYEnd ? "" : undefined;
    }
  };
}
//# sourceMappingURL=state-attrs.jsx.map
