package com.suno.android.common_ui.extensions import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.calculateEndPadding import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalLayoutDirection @Composable operator fun PaddingValues.plus( other: PaddingValues, ): PaddingValues { val layoutDirection = LocalLayoutDirection.current return PaddingValues( start = this.calculateStartPadding(layoutDirection) + other.calculateStartPadding(layoutDirection), top = this.calculateTopPadding() + other.calculateTopPadding(), end = this.calculateEndPadding(layoutDirection) + other.calculateEndPadding(layoutDirection), bottom = this.calculateBottomPadding() + other.calculateBottomPadding(), ) } @Composable fun PaddingValues.horizontalOnly(): PaddingValues { val layoutDirection = LocalLayoutDirection.current return PaddingValues( start = this.calculateStartPadding(layoutDirection), end = this.calculateEndPadding(layoutDirection), ) } fun PaddingValues.verticalOnly(): PaddingValues = PaddingValues( top = this.calculateTopPadding(), bottom = this.calculateBottomPadding(), )