//
// Copyright IBM Corp. 2016, 2018
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

@import '../scss/feature-flags';
@import '../scss/functions';
@import '../scss/mixins';
@import '../scss/vendor/@rocketsoftware/elements/scss/grid/mixins';

@mixin grid {
  @if feature-flag-enabled('grid-columns-16') {
    @include carbon--grid();
  } @else {
    $carbon--12-column-grid: map-merge(
      $carbon--grid-breakpoints,
      (
        lg:
          map-merge(
            map-get($carbon--grid-breakpoints, lg),
            (
              columns: 12,
            )
          ),
        xlg:
          map-merge(
            map-get($carbon--grid-breakpoints, xlg),
            (
              columns: 12,
            )
          ),
        max:
          map-merge(
            map-get($carbon--grid-breakpoints, max),
            (
              columns: 12,
            )
          ),
      )
    );
    @include carbon--grid($carbon--12-column-grid);
  }
}

@include exports('grid') {
  @include grid;
}
