// Copyright (c) Meta Platforms, Inc. and affiliates. 'use client'; import {useState} from 'react'; import {InternationalizationProvider} from '@astryxdesign/core/i18n'; import {VStack} from '@astryxdesign/core/Layout'; import {Pagination} from '@astryxdesign/core/Pagination'; import { SegmentedControl, SegmentedControlItem, } from '@astryxdesign/core/SegmentedControl'; type TextDirection = 'ltr' | 'rtl'; export default function InternationalizationProviderRtlDirection() { const [textDirection, setTextDirection] = useState('ltr'); const [page, setPage] = useState(3); return ( {/* `dir` on the VStack scopes text direction to this subtree — no extra wrapper needed. (VStack has no `direction` prop, so there's nothing to confuse with `dir` here.) */} setTextDirection(next as TextDirection)} size="sm"> ); }