//
//  TabButtons.swift
//  Balance
//
//  Created by Christian Baroni on 11/29/17.
//  Copyright © 2017 Balance. All rights reserved.
//
//  Generated by PaintCode
//  http://www.paintcodeapp.com
//

import Cocoa

public struct TabButtons {

    //// Drawing Methods

    public static func drawAccounts(frame targetFrame: NSRect = NSRect(x: 0, y: 0, width: 99, height: 29), buttonText: String = "Accounts", original: Bool = true, pressed: Bool = false, color: NSColor = .clear) {
        //// General Declarations
        let context = NSGraphicsContext.current!.cgContext
        
        //// Resize to Target Frame
        NSGraphicsContext.saveGraphicsState()
        let resizing: ResizingBehavior = .aspectFit
        let resizedFrame: NSRect = resizing.apply(rect: NSRect(x: 0, y: 0, width: 99, height: 29), target: targetFrame)
        context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY)
        context.scaleBy(x: resizedFrame.width / 99, y: resizedFrame.height / 29)


        //// Color Declarations
        let iconSecondaryBackground = NSColor(red: 0.412, green: 0.427, blue: 0.478, alpha: 0.8)
        let iconPrimaryBackground = NSColor(red: 0.412, green: 0.427, blue: 0.478, alpha: 1)
        let buttonLabelBackground = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.8)
        let iconPrimaryBackgroundPressed = NSColor(red: 0.345, green: 0.365, blue: 0.42, alpha: 1)
        let iconSecondaryBackgroundPressed = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.9)
        let buttonLabelBackgroundPressed = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.9)

        if original {
            //// tabAccounts
            //// tabLabel Drawing
            let tabLabelRect = NSRect(x: 27, y: 4, width: 68, height: 22)
            let tabLabelTextContent = buttonText
            let tabLabelStyle = NSMutableParagraphStyle()
            tabLabelStyle.alignment = .left
            let tabLabelFontAttributes = [
                .font: NSFont.systemFont(ofSize: 14, weight: .medium),
                .foregroundColor: buttonLabelBackground,
                .paragraphStyle: tabLabelStyle,
            ] as [NSAttributedStringKey: Any]

            let tabLabelTextHeight: CGFloat = tabLabelTextContent.boundingRect(with: NSSize(width: tabLabelRect.width, height: CGFloat.infinity), options: .usesLineFragmentOrigin, attributes: tabLabelFontAttributes).height
            let tabLabelTextRect: NSRect = NSRect(x: tabLabelRect.minX, y: tabLabelRect.minY + (tabLabelRect.height - tabLabelTextHeight) / 2, width: tabLabelRect.width, height: tabLabelTextHeight)
            NSGraphicsContext.saveGraphicsState()
            tabLabelRect.clip()
            tabLabelTextContent.draw(in: tabLabelTextRect.offsetBy(dx: 0, dy: 1), withAttributes: tabLabelFontAttributes)
            NSGraphicsContext.restoreGraphicsState()


            //// accountsIconSecondary Drawing
            let accountsIconSecondaryPath = NSBezierPath()
            accountsIconSecondaryPath.move(to: NSPoint(x: 21.98, y: 17.63))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 21.67, y: 18.72), controlPoint1: NSPoint(x: 21.93, y: 18.1), controlPoint2: NSPoint(x: 21.83, y: 18.42))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 20.72, y: 19.67), controlPoint1: NSPoint(x: 21.45, y: 19.13), controlPoint2: NSPoint(x: 21.13, y: 19.45))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 19.06, y: 20), controlPoint1: NSPoint(x: 20.31, y: 19.88), controlPoint2: NSPoint(x: 19.86, y: 20))
            accountsIconSecondaryPath.line(to: NSPoint(x: 11.94, y: 20))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 10.28, y: 19.67), controlPoint1: NSPoint(x: 11.14, y: 20), controlPoint2: NSPoint(x: 10.69, y: 19.88))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 9.33, y: 18.72), controlPoint1: NSPoint(x: 9.87, y: 19.45), controlPoint2: NSPoint(x: 9.55, y: 19.13))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 9.02, y: 17.63), controlPoint1: NSPoint(x: 9.17, y: 18.42), controlPoint2: NSPoint(x: 9.07, y: 18.1))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 9.57, y: 17.99), controlPoint1: NSPoint(x: 9.2, y: 17.77), controlPoint2: NSPoint(x: 9.38, y: 17.89))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 11.94, y: 18.5), controlPoint1: NSPoint(x: 10.25, y: 18.35), controlPoint2: NSPoint(x: 10.96, y: 18.5))
            accountsIconSecondaryPath.line(to: NSPoint(x: 19.06, y: 18.5))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 21.43, y: 17.99), controlPoint1: NSPoint(x: 20.04, y: 18.5), controlPoint2: NSPoint(x: 20.75, y: 18.35))
            accountsIconSecondaryPath.curve(to: NSPoint(x: 21.98, y: 17.63), controlPoint1: NSPoint(x: 21.62, y: 17.89), controlPoint2: NSPoint(x: 21.8, y: 17.77))
            accountsIconSecondaryPath.close()
            accountsIconSecondaryPath.windingRule = .evenOddWindingRule
            iconSecondaryBackground.setFill()
            accountsIconSecondaryPath.fill()


            //// accountsIconPrimary Drawing
            let accountsIconPrimaryPath = NSBezierPath(roundedRect: NSRect(x: 9, y: 10.5, width: 13, height: 6.5), xRadius: 2.5, yRadius: 2.5)
            iconPrimaryBackground.setFill()
            accountsIconPrimaryPath.fill()


        }


        if pressed {
            //// tabAccountsPressed
            //// tabLabel 2 Drawing
            let tabLabel2Rect = NSRect(x: 27, y: 4, width: 68, height: 22)
            let tabLabel2TextContent = buttonText
            let tabLabel2Style = NSMutableParagraphStyle()
            tabLabel2Style.alignment = .left
            let tabLabel2FontAttributes = [
                .font: NSFont.systemFont(ofSize: 14, weight: .medium),
                .foregroundColor: buttonLabelBackgroundPressed,
                .paragraphStyle: tabLabel2Style,
            ] as [NSAttributedStringKey: Any]

            let tabLabel2TextHeight: CGFloat = tabLabel2TextContent.boundingRect(with: NSSize(width: tabLabel2Rect.width, height: CGFloat.infinity), options: .usesLineFragmentOrigin, attributes: tabLabel2FontAttributes).height
            let tabLabel2TextRect: NSRect = NSRect(x: tabLabel2Rect.minX, y: tabLabel2Rect.minY + (tabLabel2Rect.height - tabLabel2TextHeight) / 2, width: tabLabel2Rect.width, height: tabLabel2TextHeight)
            NSGraphicsContext.saveGraphicsState()
            tabLabel2Rect.clip()
            tabLabel2TextContent.draw(in: tabLabel2TextRect.offsetBy(dx: 0, dy: 1), withAttributes: tabLabel2FontAttributes)
            NSGraphicsContext.restoreGraphicsState()


            //// accountsIconSecondary 2 Drawing
            NSGraphicsContext.saveGraphicsState()
            context.setAlpha(0.8)

            let accountsIconSecondary2Path = NSBezierPath()
            accountsIconSecondary2Path.move(to: NSPoint(x: 21.98, y: 17.63))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 21.67, y: 18.72), controlPoint1: NSPoint(x: 21.93, y: 18.1), controlPoint2: NSPoint(x: 21.83, y: 18.42))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 20.72, y: 19.67), controlPoint1: NSPoint(x: 21.45, y: 19.13), controlPoint2: NSPoint(x: 21.13, y: 19.45))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 19.06, y: 20), controlPoint1: NSPoint(x: 20.31, y: 19.88), controlPoint2: NSPoint(x: 19.86, y: 20))
            accountsIconSecondary2Path.line(to: NSPoint(x: 11.94, y: 20))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 10.28, y: 19.67), controlPoint1: NSPoint(x: 11.14, y: 20), controlPoint2: NSPoint(x: 10.69, y: 19.88))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 9.33, y: 18.72), controlPoint1: NSPoint(x: 9.87, y: 19.45), controlPoint2: NSPoint(x: 9.55, y: 19.13))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 9.02, y: 17.63), controlPoint1: NSPoint(x: 9.17, y: 18.42), controlPoint2: NSPoint(x: 9.07, y: 18.1))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 9.57, y: 17.99), controlPoint1: NSPoint(x: 9.2, y: 17.77), controlPoint2: NSPoint(x: 9.38, y: 17.89))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 11.94, y: 18.5), controlPoint1: NSPoint(x: 10.25, y: 18.35), controlPoint2: NSPoint(x: 10.96, y: 18.5))
            accountsIconSecondary2Path.line(to: NSPoint(x: 19.06, y: 18.5))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 21.43, y: 17.99), controlPoint1: NSPoint(x: 20.04, y: 18.5), controlPoint2: NSPoint(x: 20.75, y: 18.35))
            accountsIconSecondary2Path.curve(to: NSPoint(x: 21.98, y: 17.63), controlPoint1: NSPoint(x: 21.62, y: 17.89), controlPoint2: NSPoint(x: 21.8, y: 17.77))
            accountsIconSecondary2Path.close()
            accountsIconSecondary2Path.windingRule = .evenOddWindingRule
            iconSecondaryBackgroundPressed.setFill()
            accountsIconSecondary2Path.fill()

            NSGraphicsContext.restoreGraphicsState()


            //// accountsIconPrimary 2 Drawing
            let accountsIconPrimary2Path = NSBezierPath(roundedRect: NSRect(x: 9, y: 10.5, width: 13, height: 6.5), xRadius: 2.5, yRadius: 2.5)
            iconPrimaryBackgroundPressed.setFill()
            accountsIconPrimary2Path.fill()


        }
        
        NSGraphicsContext.restoreGraphicsState()

    }

    public static func drawTransactions(frame targetFrame: NSRect = NSRect(x: 0, y: 0, width: 120, height: 29), buttonText: String = "Transactions", original: Bool = true, pressed: Bool = false, color: NSColor = .clear) {
        //// General Declarations
        let context = NSGraphicsContext.current!.cgContext
        
        //// Resize to Target Frame
        NSGraphicsContext.saveGraphicsState()
        let resizing: ResizingBehavior = .aspectFit
        let resizedFrame: NSRect = resizing.apply(rect: NSRect(x: 0, y: 0, width: 120, height: 29), target: targetFrame)
        context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY)
        context.scaleBy(x: resizedFrame.width / 120, y: resizedFrame.height / 29)


        //// Color Declarations
        let iconPrimaryBackground = NSColor(red: 0.412, green: 0.427, blue: 0.478, alpha: 1)
        let buttonLabelBackground = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.8)
        let iconPrimaryBackgroundPressed = NSColor(red: 0.345, green: 0.365, blue: 0.42, alpha: 1)
        let buttonLabelBackgroundPressed = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.9)

        if original {
            //// tabTransactions
            //// tabLabel Drawing
            let tabLabelRect = NSRect(x: 25, y: 4, width: 87, height: 22)
            let tabLabelTextContent = buttonText
            let tabLabelStyle = NSMutableParagraphStyle()
            tabLabelStyle.alignment = .left
            let tabLabelFontAttributes = [
                .font: NSFont.systemFont(ofSize: 14, weight: .medium),
                .foregroundColor: buttonLabelBackground,
                .paragraphStyle: tabLabelStyle,
            ] as [NSAttributedStringKey: Any]

            let tabLabelTextHeight: CGFloat = tabLabelTextContent.boundingRect(with: NSSize(width: tabLabelRect.width, height: CGFloat.infinity), options: .usesLineFragmentOrigin, attributes: tabLabelFontAttributes).height
            let tabLabelTextRect: NSRect = NSRect(x: tabLabelRect.minX, y: tabLabelRect.minY + (tabLabelRect.height - tabLabelTextHeight) / 2, width: tabLabelRect.width, height: tabLabelTextHeight)
            NSGraphicsContext.saveGraphicsState()
            tabLabelRect.clip()
            tabLabelTextContent.draw(in: tabLabelTextRect.offsetBy(dx: 0, dy: 1), withAttributes: tabLabelFontAttributes)
            NSGraphicsContext.restoreGraphicsState()


            //// arrowDown Drawing
            let arrowDownPath = NSBezierPath()
            arrowDownPath.move(to: NSPoint(x: 18, y: 13.01))
            arrowDownPath.line(to: NSPoint(x: 16.38, y: 13.01))
            arrowDownPath.curve(to: NSPoint(x: 16.04, y: 12.8), controlPoint1: NSPoint(x: 16.24, y: 13.01), controlPoint2: NSPoint(x: 16.11, y: 12.93))
            arrowDownPath.curve(to: NSPoint(x: 16.07, y: 12.4), controlPoint1: NSPoint(x: 15.98, y: 12.67), controlPoint2: NSPoint(x: 15.99, y: 12.52))
            arrowDownPath.line(to: NSPoint(x: 18.69, y: 8.66))
            arrowDownPath.curve(to: NSPoint(x: 19, y: 8.5), controlPoint1: NSPoint(x: 18.77, y: 8.56), controlPoint2: NSPoint(x: 18.88, y: 8.5))
            arrowDownPath.curve(to: NSPoint(x: 19.31, y: 8.66), controlPoint1: NSPoint(x: 19.12, y: 8.5), controlPoint2: NSPoint(x: 19.24, y: 8.56))
            arrowDownPath.line(to: NSPoint(x: 21.93, y: 12.4))
            arrowDownPath.curve(to: NSPoint(x: 21.96, y: 12.8), controlPoint1: NSPoint(x: 22.01, y: 12.52), controlPoint2: NSPoint(x: 22.02, y: 12.67))
            arrowDownPath.curve(to: NSPoint(x: 21.62, y: 13.01), controlPoint1: NSPoint(x: 21.9, y: 12.93), controlPoint2: NSPoint(x: 21.77, y: 13.01))
            arrowDownPath.line(to: NSPoint(x: 20, y: 13.01))
            arrowDownPath.line(to: NSPoint(x: 20, y: 17.15))
            arrowDownPath.line(to: NSPoint(x: 20, y: 17.15))
            arrowDownPath.curve(to: NSPoint(x: 19.15, y: 18), controlPoint1: NSPoint(x: 20, y: 17.62), controlPoint2: NSPoint(x: 19.62, y: 18))
            arrowDownPath.line(to: NSPoint(x: 18.85, y: 18))
            arrowDownPath.line(to: NSPoint(x: 18.85, y: 18))
            arrowDownPath.curve(to: NSPoint(x: 18, y: 17.15), controlPoint1: NSPoint(x: 18.38, y: 18), controlPoint2: NSPoint(x: 18, y: 17.62))
            arrowDownPath.line(to: NSPoint(x: 18, y: 13.01))
            arrowDownPath.close()
            iconPrimaryBackground.setFill()
            arrowDownPath.fill()


            //// arrowUp Drawing
            let arrowUpPath = NSBezierPath()
            arrowUpPath.move(to: NSPoint(x: 13.5, y: 17.49))
            arrowUpPath.line(to: NSPoint(x: 15.12, y: 17.49))
            arrowUpPath.curve(to: NSPoint(x: 15.46, y: 17.7), controlPoint1: NSPoint(x: 15.26, y: 17.49), controlPoint2: NSPoint(x: 15.39, y: 17.58))
            arrowUpPath.curve(to: NSPoint(x: 15.43, y: 18.1), controlPoint1: NSPoint(x: 15.52, y: 17.83), controlPoint2: NSPoint(x: 15.51, y: 17.98))
            arrowUpPath.line(to: NSPoint(x: 12.81, y: 21.84))
            arrowUpPath.curve(to: NSPoint(x: 12.5, y: 22), controlPoint1: NSPoint(x: 12.74, y: 21.94), controlPoint2: NSPoint(x: 12.62, y: 22))
            arrowUpPath.curve(to: NSPoint(x: 12.19, y: 21.84), controlPoint1: NSPoint(x: 12.38, y: 22), controlPoint2: NSPoint(x: 12.26, y: 21.94))
            arrowUpPath.line(to: NSPoint(x: 9.57, y: 18.1))
            arrowUpPath.curve(to: NSPoint(x: 9.54, y: 17.7), controlPoint1: NSPoint(x: 9.49, y: 17.98), controlPoint2: NSPoint(x: 9.48, y: 17.83))
            arrowUpPath.curve(to: NSPoint(x: 9.88, y: 17.49), controlPoint1: NSPoint(x: 9.61, y: 17.58), controlPoint2: NSPoint(x: 9.74, y: 17.49))
            arrowUpPath.line(to: NSPoint(x: 11.5, y: 17.49))
            arrowUpPath.line(to: NSPoint(x: 11.5, y: 13.35))
            arrowUpPath.line(to: NSPoint(x: 11.5, y: 13.35))
            arrowUpPath.curve(to: NSPoint(x: 12.35, y: 12.5), controlPoint1: NSPoint(x: 11.5, y: 12.88), controlPoint2: NSPoint(x: 11.88, y: 12.5))
            arrowUpPath.line(to: NSPoint(x: 12.65, y: 12.5))
            arrowUpPath.line(to: NSPoint(x: 12.65, y: 12.5))
            arrowUpPath.curve(to: NSPoint(x: 13.5, y: 13.35), controlPoint1: NSPoint(x: 13.12, y: 12.5), controlPoint2: NSPoint(x: 13.5, y: 12.88))
            arrowUpPath.line(to: NSPoint(x: 13.5, y: 17.49))
            arrowUpPath.close()
            iconPrimaryBackground.setFill()
            arrowUpPath.fill()


        }


        if pressed {
            //// tabTransactionsPressed
            //// tabLabel 2 Drawing
            let tabLabel2Rect = NSRect(x: 25, y: 4, width: 87, height: 22)
            let tabLabel2TextContent = buttonText
            let tabLabel2Style = NSMutableParagraphStyle()
            tabLabel2Style.alignment = .left
            let tabLabel2FontAttributes = [
                .font: NSFont.systemFont(ofSize: 14, weight: .medium),
                .foregroundColor: buttonLabelBackgroundPressed,
                .paragraphStyle: tabLabel2Style,
            ] as [NSAttributedStringKey: Any]

            let tabLabel2TextHeight: CGFloat = tabLabel2TextContent.boundingRect(with: NSSize(width: tabLabel2Rect.width, height: CGFloat.infinity), options: .usesLineFragmentOrigin, attributes: tabLabel2FontAttributes).height
            let tabLabel2TextRect: NSRect = NSRect(x: tabLabel2Rect.minX, y: tabLabel2Rect.minY + (tabLabel2Rect.height - tabLabel2TextHeight) / 2, width: tabLabel2Rect.width, height: tabLabel2TextHeight)
            NSGraphicsContext.saveGraphicsState()
            tabLabel2Rect.clip()
            tabLabel2TextContent.draw(in: tabLabel2TextRect.offsetBy(dx: 0, dy: 1), withAttributes: tabLabel2FontAttributes)
            NSGraphicsContext.restoreGraphicsState()


            //// arrowDown 2 Drawing
            let arrowDown2Path = NSBezierPath()
            arrowDown2Path.move(to: NSPoint(x: 18, y: 13.01))
            arrowDown2Path.line(to: NSPoint(x: 16.38, y: 13.01))
            arrowDown2Path.curve(to: NSPoint(x: 16.04, y: 12.8), controlPoint1: NSPoint(x: 16.24, y: 13.01), controlPoint2: NSPoint(x: 16.11, y: 12.93))
            arrowDown2Path.curve(to: NSPoint(x: 16.07, y: 12.4), controlPoint1: NSPoint(x: 15.98, y: 12.67), controlPoint2: NSPoint(x: 15.99, y: 12.52))
            arrowDown2Path.line(to: NSPoint(x: 18.69, y: 8.66))
            arrowDown2Path.curve(to: NSPoint(x: 19, y: 8.5), controlPoint1: NSPoint(x: 18.77, y: 8.56), controlPoint2: NSPoint(x: 18.88, y: 8.5))
            arrowDown2Path.curve(to: NSPoint(x: 19.31, y: 8.66), controlPoint1: NSPoint(x: 19.12, y: 8.5), controlPoint2: NSPoint(x: 19.24, y: 8.56))
            arrowDown2Path.line(to: NSPoint(x: 21.93, y: 12.4))
            arrowDown2Path.curve(to: NSPoint(x: 21.96, y: 12.8), controlPoint1: NSPoint(x: 22.01, y: 12.52), controlPoint2: NSPoint(x: 22.02, y: 12.67))
            arrowDown2Path.curve(to: NSPoint(x: 21.62, y: 13.01), controlPoint1: NSPoint(x: 21.9, y: 12.93), controlPoint2: NSPoint(x: 21.77, y: 13.01))
            arrowDown2Path.line(to: NSPoint(x: 20, y: 13.01))
            arrowDown2Path.line(to: NSPoint(x: 20, y: 17.15))
            arrowDown2Path.line(to: NSPoint(x: 20, y: 17.15))
            arrowDown2Path.curve(to: NSPoint(x: 19.15, y: 18), controlPoint1: NSPoint(x: 20, y: 17.62), controlPoint2: NSPoint(x: 19.62, y: 18))
            arrowDown2Path.line(to: NSPoint(x: 18.85, y: 18))
            arrowDown2Path.line(to: NSPoint(x: 18.85, y: 18))
            arrowDown2Path.curve(to: NSPoint(x: 18, y: 17.15), controlPoint1: NSPoint(x: 18.38, y: 18), controlPoint2: NSPoint(x: 18, y: 17.62))
            arrowDown2Path.line(to: NSPoint(x: 18, y: 13.01))
            arrowDown2Path.close()
            iconPrimaryBackgroundPressed.setFill()
            arrowDown2Path.fill()


            //// arrowUp 2 Drawing
            let arrowUp2Path = NSBezierPath()
            arrowUp2Path.move(to: NSPoint(x: 13.5, y: 17.49))
            arrowUp2Path.line(to: NSPoint(x: 15.12, y: 17.49))
            arrowUp2Path.curve(to: NSPoint(x: 15.46, y: 17.7), controlPoint1: NSPoint(x: 15.26, y: 17.49), controlPoint2: NSPoint(x: 15.39, y: 17.58))
            arrowUp2Path.curve(to: NSPoint(x: 15.43, y: 18.1), controlPoint1: NSPoint(x: 15.52, y: 17.83), controlPoint2: NSPoint(x: 15.51, y: 17.98))
            arrowUp2Path.line(to: NSPoint(x: 12.81, y: 21.84))
            arrowUp2Path.curve(to: NSPoint(x: 12.5, y: 22), controlPoint1: NSPoint(x: 12.74, y: 21.94), controlPoint2: NSPoint(x: 12.62, y: 22))
            arrowUp2Path.curve(to: NSPoint(x: 12.19, y: 21.84), controlPoint1: NSPoint(x: 12.38, y: 22), controlPoint2: NSPoint(x: 12.26, y: 21.94))
            arrowUp2Path.line(to: NSPoint(x: 9.57, y: 18.1))
            arrowUp2Path.curve(to: NSPoint(x: 9.54, y: 17.7), controlPoint1: NSPoint(x: 9.49, y: 17.98), controlPoint2: NSPoint(x: 9.48, y: 17.83))
            arrowUp2Path.curve(to: NSPoint(x: 9.88, y: 17.49), controlPoint1: NSPoint(x: 9.61, y: 17.58), controlPoint2: NSPoint(x: 9.74, y: 17.49))
            arrowUp2Path.line(to: NSPoint(x: 11.5, y: 17.49))
            arrowUp2Path.line(to: NSPoint(x: 11.5, y: 13.35))
            arrowUp2Path.line(to: NSPoint(x: 11.5, y: 13.35))
            arrowUp2Path.curve(to: NSPoint(x: 12.35, y: 12.5), controlPoint1: NSPoint(x: 11.5, y: 12.88), controlPoint2: NSPoint(x: 11.88, y: 12.5))
            arrowUp2Path.line(to: NSPoint(x: 12.65, y: 12.5))
            arrowUp2Path.line(to: NSPoint(x: 12.65, y: 12.5))
            arrowUp2Path.curve(to: NSPoint(x: 13.5, y: 13.35), controlPoint1: NSPoint(x: 13.12, y: 12.5), controlPoint2: NSPoint(x: 13.5, y: 12.88))
            arrowUp2Path.line(to: NSPoint(x: 13.5, y: 17.49))
            arrowUp2Path.close()
            iconPrimaryBackgroundPressed.setFill()
            arrowUp2Path.fill()


        }
        
        NSGraphicsContext.restoreGraphicsState()

    }

    public static func drawBackground(frame targetFrame: NSRect = NSRect(x: 0, y: 0, width: 99, height: 29)) {
        //// General Declarations
        let context = NSGraphicsContext.current!.cgContext
        
        //// Resize to Target Frame
        NSGraphicsContext.saveGraphicsState()

        //// Color Declarations
        let buttonBackgroundColor = NSColor(red: 0.678, green: 0.694, blue: 0.722, alpha: 1)
        let color = NSColor(red: 0, green: 0, blue: 0, alpha: 0.02)

        //// backgroundGroup
        //// tabBackground Drawing
        NSGraphicsContext.saveGraphicsState()
        context.setAlpha(0.2)
        context.beginTransparencyLayer(auxiliaryInfo: nil)

        let tabBackgroundPath = NSBezierPath(roundedRect: targetFrame, xRadius: 9, yRadius: 9)//NSBezierPath(roundedRect: NSRect(origin: NSPoint.zero, size: targetFrame.size), xRadius: 9, yRadius: 9)//NSBezierPath(roundedRect: NSRect(x: frame.minX - 11, y: frame.minY + frame.height - 29, width: 99, height: 29), xRadius: 9, yRadius: 9)
        buttonBackgroundColor.setFill()
        tabBackgroundPath.fill()
        color.setStroke()
        tabBackgroundPath.lineWidth = 1
        tabBackgroundPath.stroke()

        context.endTransparencyLayer()
        NSGraphicsContext.restoreGraphicsState()
        
        NSGraphicsContext.restoreGraphicsState()

    }

    public static func drawPrices(frame targetFrame: NSRect = NSRect(x: 0, y: 0, width: 79, height: 29), buttonText: String = "Prices", original: Bool = true, pressed: Bool = false, color: NSColor = .clear) {
        //// General Declarations
        let context = NSGraphicsContext.current!.cgContext
        
        //// Resize to Target Frame
        NSGraphicsContext.saveGraphicsState()
        let resizing: ResizingBehavior = .aspectFit
        let resizedFrame: NSRect = resizing.apply(rect: NSRect(x: 0, y: 0, width: 79, height: 29), target: targetFrame)
        context.translateBy(x: resizedFrame.minX, y: resizedFrame.minY)
        context.scaleBy(x: resizedFrame.width / 79, y: resizedFrame.height / 29)


        //// Color Declarations
        let iconPrimaryBackground = NSColor(red: 0.412, green: 0.427, blue: 0.478, alpha: 1)
        let buttonLabelBackground = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.8)
        let iconDimBackground = NSColor(red: 0.412, green: 0.427, blue: 0.478, alpha: 0.7)
        let iconPrimaryBackgroundPressed = NSColor(red: 0.345, green: 0.365, blue: 0.42, alpha: 1)
        let buttonLabelBackgroundPressed = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.9)
        let iconDimBackgroundPressed = NSColor(red: 0.282, green: 0.306, blue: 0.365, alpha: 0.9)

        if original {
            //// prices
            //// tabLabel Drawing
            let tabLabelRect = NSRect(x: 28, y: 4, width: 46, height: 22)
            let tabLabelTextContent = buttonText
            let tabLabelStyle = NSMutableParagraphStyle()
            tabLabelStyle.alignment = .left
            let tabLabelFontAttributes = [
                .font: NSFont.systemFont(ofSize: 14, weight: .medium),
                .foregroundColor: buttonLabelBackground,
                .paragraphStyle: tabLabelStyle,
            ] as [NSAttributedStringKey: Any]

            let tabLabelTextHeight: CGFloat = tabLabelTextContent.boundingRect(with: NSSize(width: tabLabelRect.width, height: CGFloat.infinity), options: .usesLineFragmentOrigin, attributes: tabLabelFontAttributes).height
            let tabLabelTextRect: NSRect = NSRect(x: tabLabelRect.minX, y: tabLabelRect.minY + (tabLabelRect.height - tabLabelTextHeight) / 2, width: tabLabelRect.width, height: tabLabelTextHeight)
            NSGraphicsContext.saveGraphicsState()
            tabLabelRect.clip()
            tabLabelTextContent.draw(in: tabLabelTextRect.offsetBy(dx: 0, dy: 1), withAttributes: tabLabelFontAttributes)
            NSGraphicsContext.restoreGraphicsState()


            //// pricesIcon
            //// line Drawing
            NSGraphicsContext.saveGraphicsState()
            context.setAlpha(0.7)

            let linePath = NSBezierPath()
            linePath.move(to: NSPoint(x: 10.5, y: 15.5))
            linePath.line(to: NSPoint(x: 16.5, y: 12.5))
            linePath.line(to: NSPoint(x: 22.5, y: 17.5))
            iconDimBackground.setStroke()
            linePath.lineWidth = 1
            linePath.miterLimit = 4
            linePath.stroke()

            NSGraphicsContext.restoreGraphicsState()


            //// oval3 Drawing
            let oval3Path = NSBezierPath(ovalIn: NSRect(x: 21, y: 16, width: 3, height: 3))
            iconPrimaryBackground.setFill()
            oval3Path.fill()


            //// oval2 Drawing
            let oval2Path = NSBezierPath(ovalIn: NSRect(x: 15, y: 11, width: 3, height: 3))
            iconPrimaryBackground.setFill()
            oval2Path.fill()


            //// oval1 Drawing
            let oval1Path = NSBezierPath(ovalIn: NSRect(x: 9, y: 14, width: 3, height: 3))
            iconPrimaryBackground.setFill()
            oval1Path.fill()




        }


        if pressed {
            //// pricesPressed
            //// tabLabel 2 Drawing
            let tabLabel2Rect = NSRect(x: 28, y: 4, width: 46, height: 22)
            let tabLabel2TextContent = buttonText
            let tabLabel2Style = NSMutableParagraphStyle()
            tabLabel2Style.alignment = .left
            let tabLabel2FontAttributes = [
                .font: NSFont.systemFont(ofSize: 14, weight: .medium),
                .foregroundColor: buttonLabelBackgroundPressed,
                .paragraphStyle: tabLabel2Style,
            ] as [NSAttributedStringKey: Any]

            let tabLabel2TextHeight: CGFloat = tabLabel2TextContent.boundingRect(with: NSSize(width: tabLabel2Rect.width, height: CGFloat.infinity), options: .usesLineFragmentOrigin, attributes: tabLabel2FontAttributes).height
            let tabLabel2TextRect: NSRect = NSRect(x: tabLabel2Rect.minX, y: tabLabel2Rect.minY + (tabLabel2Rect.height - tabLabel2TextHeight) / 2, width: tabLabel2Rect.width, height: tabLabel2TextHeight)
            NSGraphicsContext.saveGraphicsState()
            tabLabel2Rect.clip()
            tabLabel2TextContent.draw(in: tabLabel2TextRect.offsetBy(dx: 0, dy: 1), withAttributes: tabLabel2FontAttributes)
            NSGraphicsContext.restoreGraphicsState()


            //// pricesIcon 2
            //// line 2 Drawing
            NSGraphicsContext.saveGraphicsState()
            context.setAlpha(0.7)

            let line2Path = NSBezierPath()
            line2Path.move(to: NSPoint(x: 10.5, y: 15.5))
            line2Path.line(to: NSPoint(x: 16.5, y: 12.5))
            line2Path.line(to: NSPoint(x: 22.5, y: 17.5))
            iconDimBackgroundPressed.setStroke()
            line2Path.lineWidth = 1
            line2Path.miterLimit = 4
            line2Path.stroke()

            NSGraphicsContext.restoreGraphicsState()


            //// oval Drawing
            let ovalPath = NSBezierPath(ovalIn: NSRect(x: 21, y: 16, width: 3, height: 3))
            iconPrimaryBackgroundPressed.setFill()
            ovalPath.fill()


            //// oval 4 Drawing
            let oval4Path = NSBezierPath(ovalIn: NSRect(x: 15, y: 11, width: 3, height: 3))
            iconPrimaryBackgroundPressed.setFill()
            oval4Path.fill()


            //// oval 5 Drawing
            let oval5Path = NSBezierPath(ovalIn: NSRect(x: 9, y: 14, width: 3, height: 3))
            iconPrimaryBackgroundPressed.setFill()
            oval5Path.fill()




        }
        
        NSGraphicsContext.restoreGraphicsState()

    }
}
