       layout = LayoutConstraints(bar: bar, hidden: hidden, visible: visible, insets: insets)
     }
     return layout
-  }
-
-  private func prepareLandscapeLayout(buttonBar: MDCButtonBar, view: UIView) -> LayoutConstraints {
-    var layout: LayoutConstraints!
-    buttonBar.snp.prepareConstraints { (make) in
-      var bar: [Constraint] = []
-      bar.append(make.top.equalTo(view).offset(Metrics.landscapeBarTopInset).constraint)
-      bar.append(make.bottom.equalTo(view).constraint)
-      bar.append(make.width.equalTo(Metrics.buttonBarHeight).constraint)
-
-      let hidden = make.leading.equalTo(view.snp.trailing).constraint
-      let visible = make.trailing.equalTo(view).constraint
-
-      let insets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: Metrics.buttonBarHeight)
-
-      layout = LayoutConstraints(bar: bar, hidden: hidden, visible: visible, insets: insets)
-    }
-    return layout
-  }
-
-  private func updateCurrentLayout(for size: CGSize) {
-    currentLayout = size.isWiderThanTall ? .landscape : .portrait
-  }
-
-  override func viewWillTransition(to size: CGSize,
-                                   with coordinator: UIViewControllerTransitionCoordinator) {
-    super.viewWillTransition(to: size, with: coordinator)
-
-    updateCurrentLayout(for: size)
   }
 
   private var isButtonBarVisible: Bool = false {

    }
  }

  private var currentLayout: Layout = .portrait {
    didSet {
      layoutConstraints[oldValue]!.disable()
      currentConstraints.enable(showBar: isButtonBarVisible)
      updateAdditionalSafeAreaInsets(isButtonBarVisible: isButtonBarVisible)
    }
  }

  private var layoutConstraints: [Layout: LayoutConstraints] = [:]
  private var currentConstraints: LayoutConstraints { return layoutConstraints[currentLayout]! }

  override func viewDidLoad() {
    super.viewDidLoad()


  typealias ToggleState = (ActionAreaBarItem, [ActionAreaBarItem])

  private struct LayoutConstraints {
    let bar: [Constraint]
    let hidden: Constraint
