//
//  Extension+View.swift
//
//
//  Created by Victor on 19/06/2024.
//

import SwiftUI

//extension View {
//    func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
//        clipShape( RoundedCorner(radius: radius, corners: corners) )
//    }
//}
//
//struct RoundedCorner: Shape {
//    let radius: CGFloat
//    let corners: UIRectCorner
//
//    init(radius: CGFloat = .infinity, corners: UIRectCorner = .allCorners) {
//        self.radius = radius
//        self.corners = corners
//    }
//
//    func path(in rect: CGRect) -> Path {
//        let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
//        return Path(path.cgPath)
//    }
//}

extension View {
    func sqFont(_ font: SQTextFont, size: CGFloat = 16) -> some View {
        self.font(.custom(font.rawValue, size: size))
    }
}

extension Font {
    static func sq(_ font: SQTextFont, size: CGFloat = 16) -> Font {
        .custom(font.rawValue, size: size)
    }
}
