/**
 *
 * @ai-apps/angular v2.152.0 | _config.scss
 *
 * Copyright 2014, 2023 IBM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


//
// Copyright IBM Corp. 2018, 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.
//

@use 'sass:map';
@use '../../../../../layout/modules/convert';

/// Namespace prefix
/// @type String
/// @access public
/// @group @carbon/grid
$prefix: 'cds' !default;

/// Total columns used in the flex grid
/// @type Number
/// @access public
/// @group @carbon/grid
$flex-grid-columns: 16 !default;

/// Carbon gutter size in rem
/// @type Number
/// @access public
/// @group @carbon/layout
$grid-gutter: convert.rem(32px) !default;

/// Carbon condensed gutter size in rem
/// @type Number
/// @access public
/// @group @carbon/layout
$grid-gutter-condensed: convert.rem(1px) !default;

// Initial map of our breakpoints and their values
/// @type Map
/// @access public
/// @group @carbon/layout
$grid-breakpoints: (
  sm: (
    columns: 4,
    margin: 0,
    width: convert.rem(320px),
  ),
  md: (
    columns: 8,
    margin: convert.rem(16px),
    width: convert.rem(672px),
  ),
  lg: (
    columns: 16,
    margin: convert.rem(16px),
    width: convert.rem(1056px),
  ),
  xlg: (
    columns: 16,
    margin: convert.rem(16px),
    width: convert.rem(1312px),
  ),
  max: (
    columns: 16,
    margin: convert.rem(24px),
    width: convert.rem(1584px),
  ),
) !default;

@if $flex-grid-columns == 12 {
  $grid-breakpoints: map.merge(
    $grid-breakpoints,
    (
      lg:
        map.merge(
          map.get($grid-breakpoints, lg),
          (
            columns: 12,
          )
        ),
      xlg:
        map.merge(
          map.get($grid-breakpoints, xlg),
          (
            columns: 12,
          )
        ),
      max:
        map.merge(
          map.get($grid-breakpoints, max),
          (
            columns: 12,
          )
        ),
    )
  );
}
