// SCSS variables are information about icon's compiled state, stored under its original file name
//
// .icon-home {
//   width: $icon-home-width;
// }
//
// The large array-like variables contain all information about a single icon
// $icon-home: x y offset_x offset_y width height total_width total_height image_path;
//
// At the bottom of this section, we provide information about the spritesheet itself
// $spritesheet: width height image $spritesheet-sprites;
$destaque-imobiliario-name: 'destaque-imobiliario';
$destaque-imobiliario-x: 0px;
$destaque-imobiliario-y: 46px;
$destaque-imobiliario-offset-x: 0px;
$destaque-imobiliario-offset-y: -46px;
$destaque-imobiliario-width: 41px;
$destaque-imobiliario-height: 23px;
$destaque-imobiliario-total-width: 120px;
$destaque-imobiliario-total-height: 69px;
$destaque-imobiliario-image: '../img/sprites.png';
$destaque-imobiliario: (0px, 46px, 0px, -46px, 41px, 23px, 120px, 69px, '../img/sprites.png', 'destaque-imobiliario', );
$facebook-name: 'facebook';
$facebook-x: 0px;
$facebook-y: 0px;
$facebook-offset-x: 0px;
$facebook-offset-y: 0px;
$facebook-width: 46px;
$facebook-height: 46px;
$facebook-total-width: 120px;
$facebook-total-height: 69px;
$facebook-image: '../img/sprites.png';
$facebook: (0px, 0px, 0px, 0px, 46px, 46px, 120px, 69px, '../img/sprites.png', 'facebook', );
$instagram-name: 'instagram';
$instagram-x: 46px;
$instagram-y: 0px;
$instagram-offset-x: -46px;
$instagram-offset-y: 0px;
$instagram-width: 46px;
$instagram-height: 46px;
$instagram-total-width: 120px;
$instagram-total-height: 69px;
$instagram-image: '../img/sprites.png';
$instagram: (46px, 0px, -46px, 0px, 46px, 46px, 120px, 69px, '../img/sprites.png', 'instagram', );
$lupa1-name: 'lupa1';
$lupa1-x: 92px;
$lupa1-y: 0px;
$lupa1-offset-x: -92px;
$lupa1-offset-y: 0px;
$lupa1-width: 28px;
$lupa1-height: 27px;
$lupa1-total-width: 120px;
$lupa1-total-height: 69px;
$lupa1-image: '../img/sprites.png';
$lupa1: (92px, 0px, -92px, 0px, 28px, 27px, 120px, 69px, '../img/sprites.png', 'lupa1', );
$spritesheet-width: 120px;
$spritesheet-height: 69px;
$spritesheet-image: '../img/sprites.png';
$spritesheet-sprites: ($destaque-imobiliario, $facebook, $instagram, $lupa1, );
$spritesheet: (120px, 69px, '../img/sprites.png', $spritesheet-sprites, );

// The provided mixins are intended to be used with the array-like variables
//
// .icon-home {
//   @include sprite-width($icon-home);
// }
//
// .icon-email {
//   @include sprite($icon-email);
// }
//
// Example usage in HTML:
//
// `display: block` sprite:
// <div class="icon-home"></div>
//
// To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class:
//
// // CSS
// .icon {
//   display: inline-block;
// }
//
// // HTML
// <i class="icon icon-home"></i>
@mixin sprite-width($sprite) {
  width: nth($sprite, 5);
}

@mixin sprite-height($sprite) {
  height: nth($sprite, 6);
}

@mixin sprite-position($sprite) {
  $sprite-offset-x: nth($sprite, 3);
  $sprite-offset-y: nth($sprite, 4);
  background-position: $sprite-offset-x  $sprite-offset-y;
}

@mixin sprite-image($sprite) {
  $sprite-image: nth($sprite, 9);
  background-image: url(#{$sprite-image});
}

@mixin sprite($sprite) {
  @include sprite-image($sprite);
  @include sprite-position($sprite);
  @include sprite-width($sprite);
  @include sprite-height($sprite);
}

// The `sprites` mixin generates identical output to the CSS template
//   but can be overridden inside of SCSS
//
// @include sprites($spritesheet-sprites);
@mixin sprites($sprites) {
  @each $sprite in $sprites {
    $sprite-name: nth($sprite, 10);
    .#{$sprite-name} {
      @include sprite($sprite);
    }
  }
}
