<commit_before>////
///  DrawerViewDataSource.swift
//

struct DrawerItem {
    let name: String
    let type: DrawerItemType
    let tracking: String?

    init(name: String, type: DrawerItemType, tracking: String? = nil) {
        self.name = name
        self.type = type
        self.tracking = tracking
    }
}

enum DrawerItemType {
    case external(String)
    case invite
    case logout
    case version
    case debugger
}

class DrawerViewDataSource: NSObject {
    lazy var items: [DrawerItem] = self.drawerItems()

    // moved into a separate function to save compile time
    private func drawerItems() -> [DrawerItem] {
        var items: [DrawerItem] = [
            DrawerItem(name: InterfaceString.Drawer.Invite, type: .invite, tracking: "invite"),
            DrawerItem(name: InterfaceString.Drawer.Magazine, type: .external("https://notforprint.co/"), tracking: "magazine"),
            DrawerItem(name: InterfaceString.Drawer.Store, type: .external("http://ello.threadless.com/"), tracking: "store"),
            DrawerItem(name: InterfaceString.Drawer.Help, type: .external("https://ello.co/wtf/"), tracking: "help"),
            DrawerItem(name: InterfaceString.Drawer.Logout, type: .logout, tracking: "logout"),
        ]
        if AuthToken().isStaff {
            items.append(DrawerItem(name: "Show Debugger", type: .debugger))
        }
        items.append(DrawerItem(name: InterfaceString.Drawer.Version, type: .version))
        return items
    }

    func itemForIndexPath(_ indexPath: IndexPath) -> DrawerItem? {
        return items.safeValue(indexPath.row)
    }
}

// MARK: UITableViewDataSource
extension DrawerViewDataSource: UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return items.count<commit_msg>change store url and remove NFP link<commit_after>////
///  DrawerViewDataSource.swift
//

struct DrawerItem {
    let name: String
    let type: DrawerItemType
    let tracking: String?

    init(name: String, type: DrawerItemType, tracking: String? = nil) {
        self.name = name
        self.type = type
        self.tracking = tracking
    }
}

enum DrawerItemType {
    case external(String)
    case invite
    case logout
    case version
    case debugger
}

class DrawerViewDataSource: NSObject {
    lazy var items: [DrawerItem] = self.drawerItems()

    // moved into a separate function to save compile time
    private func drawerItems() -> [DrawerItem] {
        var items: [DrawerItem] = [
            DrawerItem(name: InterfaceString.Drawer.Invite, type: .invite, tracking: "invite"),
            DrawerItem(name: InterfaceString.Drawer.Store, type: .external("http://store.ello.co/"), tracking: "store"),
            DrawerItem(name: InterfaceString.Drawer.Help, type: .external("https://ello.co/wtf/"), tracking: "help"),
            DrawerItem(name: InterfaceString.Drawer.Logout, type: .logout, tracking: "logout"),
        ]
        if AuthToken().isStaff {
            items.append(DrawerItem(name: "Show Debugger", type: .debugger))
        }
        items.append(DrawerItem(name: InterfaceString.Drawer.Version, type: .version))
        return items
    }

    func itemForIndexPath(_ indexPath: IndexPath) -> DrawerItem? {
        return items.safeValue(indexPath.row)
    }
}

// MARK: UITableViewDataSource
extension DrawerViewDataSource: UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return items.count
{'fraction_non_alphanumeric': 0.11444759206798867, 'fraction_numerical': 0.0, 'mean_word_length': 2.9763513513513513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '931141', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1019, 'n_words': 253}