 }
 
 class TextFormattingInputViewController: UIInputViewController {
+    private let storyboardName = "TextFormatting"
     @IBOutlet weak var containerView: UIView!
-
     weak var delegate: TextFormattingDelegate?
 
     enum InputViewType {

    private func embedNavigationController() {
        addChild(embeddedNavigationController)
        embeddedNavigationController.view.frame = containerView.frame
        containerView.addSubview(embeddedNavigationController.view)
        embeddedNavigationController.didMove(toParent: self)
    }

        case textStyle
    }

    private lazy var textStyleFormattingTableViewController: TextStyleFormattingTableViewController = {
        let viewController = TextStyleFormattingTableViewController.wmf_viewControllerFromStoryboardNamed(storyboardName)
        viewController.delegate = delegate
        return viewController
    }()

    private lazy var textFormattingTableViewController: TextFormattingTableViewController = {
        let viewController = TextFormattingTableViewController.wmf_viewControllerFromStoryboardNamed(storyboardName)
        viewController.delegate = delegate
        return viewController
    }()

    var inputViewType = InputViewType.textFormatting {
        didSet {
            guard viewIfLoaded != nil else {
                return
            }
            guard inputViewType != oldValue else {
                return
            }
            let viewController: UIViewController & Themeable
            switch inputViewType {
            case .textFormatting:
                viewController = textFormattingTableViewController
            case .textStyle:
                viewController = textStyleFormattingTableViewController
            }
            viewController.apply(theme: theme)
            embeddedNavigationController.viewControllers = [viewController]
        }
    }

    private var theme = Theme.standard

    private lazy var embeddedNavigationController: UINavigationController = {
        var rootViewController: (UIViewController & Themeable)

        if inputViewType == .textFormatting {
            rootViewController = textFormattingTableViewController
        } else {
            rootViewController = textStyleFormattingTableViewController
        }

        rootViewController.apply(theme: theme)

        let navigationController = UINavigationController(rootViewController: rootViewController)
