Repository: JetBrains/compose-multiplatform
File: components/SplitPane/library/src/commonMain/kotlin/org/jetbrains/compose/splitpane/SplitPaneDSL.kt (Kotlin)

Code before:

    /**
     * Set up handle part, this part of splitter would be measured and placed above [visiblePart] content.
     * Size of handle will have no effect on split pane parts (first and second) sizes.
     *
     * @param alignment alignment of handle according to [visiblePart] could be:
     * * [SplitterHandleAlignment.BEFORE] if you place handle before [visiblePart],
     * * [SplitterHandleAlignment.ABOVE] if you place handle above [visiblePart] (will be centered)
     * * and [SplitterHandleAlignment.AFTER] if you place handle after [visiblePart].
     *
     * @param content composable item content provider. Uses [HandleScope] to allow mark any provided composable part
     * as handle.
     * [content] will be placed only if [SplitPaneState.moveEnabled] is true
     */
    fun handle(
        alignment: SplitterHandleAlignment = SplitterHandleAlignment.ABOVE,
        content: @Composable HandleScope.() -> Unit
    )
}

@OptIn(ExperimentalSplitPaneApi::class)
internal class HandleScopeImpl(
    private val containerScope: SplitPaneScopeImpl
) : HandleScope {
    @Composable
    override fun Modifier.markAsHandle(): Modifier = this.run {
        val layoutDirection = LocalLayoutDirection.current
        pointerInput(containerScope.splitPaneState) {
            detectDragGestures { change, _ ->
                change.consume()
                containerScope.splitPaneState.dispatchRawMovement(
                    if (containerScope.isHorizontal)
                        if (layoutDirection == LayoutDirection.Ltr) change.position.x else -change.position.x
                    else change.position.y
                )
            }
        }
    }
}

@OptIn(ExperimentalSplitPaneApi::class)
internal class SplitterScopeImpl(
    private val containerScope: SplitPaneScopeImpl
) : SplitterScope {

    override fun visiblePart(content: @Composable () -> Unit) {
        containerScope.visiblePart = content
    }

    override fun handle(
        alignment: SplitterHandleAlignment,

Review comment (suggestion):
```suggestion
    override fun Modifier.markAsHandle(): Modifier = composed {
```
You can access `LocalLayoutDirection` this way.

Better though to convert it to [Modifier.Node](https://developer.android.com/jetpack/compose/custom-modifiers), but it is not easy - `composed` will do for now.

Code after:

    /**
     * Set up handle part, this part of splitter would be measured and placed above [visiblePart] content.
     * Size of handle will have no effect on split pane parts (first and second) sizes.
     *
     * @param alignment alignment of handle according to [visiblePart] could be:
     * * [SplitterHandleAlignment.BEFORE] if you place handle before [visiblePart],
     * * [SplitterHandleAlignment.ABOVE] if you place handle above [visiblePart] (will be centered)
     * * and [SplitterHandleAlignment.AFTER] if you place handle after [visiblePart].
     *
     * @param content composable item content provider. Uses [HandleScope] to allow mark any provided composable part
     * as handle.
     * [content] will be placed only if [SplitPaneState.moveEnabled] is true
     */
    fun handle(
        alignment: SplitterHandleAlignment = SplitterHandleAlignment.ABOVE,
        content: @Composable HandleScope.() -> Unit
    )
}

@OptIn(ExperimentalSplitPaneApi::class)
internal class HandleScopeImpl(
    private val containerScope: SplitPaneScopeImpl
) : HandleScope {
    override fun Modifier.markAsHandle(): Modifier = composed {
        val layoutDirection = LocalLayoutDirection.current
        pointerInput(containerScope.splitPaneState) {
            detectDragGestures { change, _ ->
                change.consume()
                containerScope.splitPaneState.dispatchRawMovement(
                    if (containerScope.isHorizontal)
                        if (layoutDirection == LayoutDirection.Ltr) change.position.x else -change.position.x
                    else change.position.y
                )
            }
        }
    }
}

@OptIn(ExperimentalSplitPaneApi::class)
internal class SplitterScopeImpl(
    private val containerScope: SplitPaneScopeImpl
) : SplitterScope {

    override fun visiblePart(content: @Composable () -> Unit) {
        containerScope.visiblePart = content
    }

    override fun handle(
        alignment: SplitterHandleAlignment,
        content: @Composable HandleScope.() -> Unit