import SwiftUI

/// Generic view modifier that allows for in-line modification of a view.
///
/// Useful for evaluating blocks that are difficult to inline otherwise i.e.:
/// `.presentationBackground` with `if #available(iOS 26.0, *) {...} else {...}`
/// where the presence of `.presentationBackground` can determine if the sheet itself styles as an iOS 26 sheet or not.
public extension View {
    @ViewBuilder
    func modify(@ViewBuilder _ transform: (Self) -> some View) -> some View {
        transform(self)
    }
}
