//go:build !no_gotd_slices
// +build !no_gotd_slices

// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// EmojiStatusClassArray is adapter for slice of EmojiStatusClass.
type EmojiStatusClassArray []EmojiStatusClass

// Sort sorts slice of EmojiStatusClass.
func ( EmojiStatusClassArray) ( func(,  EmojiStatusClass) bool) EmojiStatusClassArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of EmojiStatusClass.
func ( EmojiStatusClassArray) ( func(,  EmojiStatusClass) bool) EmojiStatusClassArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of EmojiStatusClass.
func ( EmojiStatusClassArray) ( func( EmojiStatusClass) bool) EmojiStatusClassArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( EmojiStatusClassArray) () ( EmojiStatusClass,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( EmojiStatusClassArray) () ( EmojiStatusClass,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *EmojiStatusClassArray) () ( EmojiStatusClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  EmojiStatusClass
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *EmojiStatusClassArray) () ( EmojiStatusClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// AsEmojiStatus returns copy with only EmojiStatus constructors.
func ( EmojiStatusClassArray) () ( EmojiStatusArray) {
	for ,  := range  {
		,  := .(*EmojiStatus)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsEmojiStatusUntil returns copy with only EmojiStatusUntil constructors.
func ( EmojiStatusClassArray) () ( EmojiStatusUntilArray) {
	for ,  := range  {
		,  := .(*EmojiStatusUntil)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AppendOnlyNotEmpty appends only NotEmpty constructors to
// given slice.
func ( EmojiStatusClassArray) ( []NotEmptyEmojiStatus) []NotEmptyEmojiStatus {
	for ,  := range  {
		,  := .AsNotEmpty()
		if ! {
			continue
		}
		 = append(, )
	}

	return 
}

// AsNotEmpty returns copy with only NotEmpty constructors.
func ( EmojiStatusClassArray) () ( []NotEmptyEmojiStatus) {
	return .AppendOnlyNotEmpty()
}

// FirstAsNotEmpty returns first element of slice (if exists).
func ( EmojiStatusClassArray) () ( NotEmptyEmojiStatus,  bool) {
	,  := .First()
	if ! {
		return
	}
	return .AsNotEmpty()
}

// LastAsNotEmpty returns last element of slice (if exists).
func ( EmojiStatusClassArray) () ( NotEmptyEmojiStatus,  bool) {
	,  := .Last()
	if ! {
		return
	}
	return .AsNotEmpty()
}

// PopFirstAsNotEmpty returns element of slice (if exists).
func ( *EmojiStatusClassArray) () ( NotEmptyEmojiStatus,  bool) {
	,  := .PopFirst()
	if ! {
		return
	}
	return .AsNotEmpty()
}

// PopAsNotEmpty returns element of slice (if exists).
func ( *EmojiStatusClassArray) () ( NotEmptyEmojiStatus,  bool) {
	,  := .Pop()
	if ! {
		return
	}
	return .AsNotEmpty()
}

// EmojiStatusArray is adapter for slice of EmojiStatus.
type EmojiStatusArray []EmojiStatus

// Sort sorts slice of EmojiStatus.
func ( EmojiStatusArray) ( func(,  EmojiStatus) bool) EmojiStatusArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of EmojiStatus.
func ( EmojiStatusArray) ( func(,  EmojiStatus) bool) EmojiStatusArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of EmojiStatus.
func ( EmojiStatusArray) ( func( EmojiStatus) bool) EmojiStatusArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( EmojiStatusArray) () ( EmojiStatus,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( EmojiStatusArray) () ( EmojiStatus,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *EmojiStatusArray) () ( EmojiStatus,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  EmojiStatus
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *EmojiStatusArray) () ( EmojiStatus,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// EmojiStatusUntilArray is adapter for slice of EmojiStatusUntil.
type EmojiStatusUntilArray []EmojiStatusUntil

// Sort sorts slice of EmojiStatusUntil.
func ( EmojiStatusUntilArray) ( func(,  EmojiStatusUntil) bool) EmojiStatusUntilArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of EmojiStatusUntil.
func ( EmojiStatusUntilArray) ( func(,  EmojiStatusUntil) bool) EmojiStatusUntilArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of EmojiStatusUntil.
func ( EmojiStatusUntilArray) ( func( EmojiStatusUntil) bool) EmojiStatusUntilArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( EmojiStatusUntilArray) () ( EmojiStatusUntil,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( EmojiStatusUntilArray) () ( EmojiStatusUntil,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *EmojiStatusUntilArray) () ( EmojiStatusUntil,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  EmojiStatusUntil
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *EmojiStatusUntilArray) () ( EmojiStatusUntil,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}