@use '../../tools' as tools;

@mixin extralightItalicComplete($font-prefix: $font-prefix) {
	@font-face {
		font-family: 'IBM Plex Sans';
		font-style: italic;
		font-weight: 200;
		src: local('IBM Plex Sans ExtraLight Italic'), local('IBMPlexSans-ExtraLightItalic'), url('#{$font-prefix}/fonts/complete/woff2/IBMPlexSans-ExtraLightItalic.woff2') format('woff2'), url('#{$font-prefix}/fonts/complete/woff/IBMPlexSans-ExtraLightItalic.woff') format('woff');
	}
}

@mixin extralightItalicSplit($font-prefix: $font-prefix, $unicode-ranges: $unicode-ranges) {
	@each $unicode-range in $unicode-ranges {
		@font-face {
			font-family: 'IBM Plex Sans';
			font-style: italic;
			font-weight: 200;
			src: local('IBM Plex Sans ExtraLight Italic'), local('IBMPlexSans-ExtraLightItalic'), url('#{$font-prefix}/fonts/split/woff2/IBMPlexSans-ExtraLightItalic-#{tools.split-range($unicode-range)}.woff2') format('woff2');
			unicode-range: tools.get-range($unicode-range);
		}	}
}

@mixin all($font-prefix: $font-prefix, $unicode-ranges: $unicode-ranges) {
	@include extralightItalicComplete($font-prefix);
	@include extralightItalicSplit($font-prefix, $unicode-ranges);
}