import Foundation
import SwiftUI
public extension View {
@ViewBuilder
func modify(@ViewBuilder _ transform: (Self) -> (some View)?) -> some View {
if let view = transform(self), !(view is EmptyView) {
view
} else {
self
}