//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{}
)

// EmojiGroupClassArray is adapter for slice of EmojiGroupClass.
type EmojiGroupClassArray []EmojiGroupClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsEmojiGroup returns copy with only EmojiGroup constructors.
func ( EmojiGroupClassArray) () ( EmojiGroupArray) {
	for ,  := range  {
		,  := .(*EmojiGroup)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsEmojiGroupGreeting returns copy with only EmojiGroupGreeting constructors.
func ( EmojiGroupClassArray) () ( EmojiGroupGreetingArray) {
	for ,  := range  {
		,  := .(*EmojiGroupGreeting)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsEmojiGroupPremium returns copy with only EmojiGroupPremium constructors.
func ( EmojiGroupClassArray) () ( EmojiGroupPremiumArray) {
	for ,  := range  {
		,  := .(*EmojiGroupPremium)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// EmojiGroupArray is adapter for slice of EmojiGroup.
type EmojiGroupArray []EmojiGroup

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// EmojiGroupGreetingArray is adapter for slice of EmojiGroupGreeting.
type EmojiGroupGreetingArray []EmojiGroupGreeting

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// EmojiGroupPremiumArray is adapter for slice of EmojiGroupPremium.
type EmojiGroupPremiumArray []EmojiGroupPremium

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}