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

// EmojiKeywordClassArray is adapter for slice of EmojiKeywordClass.
type EmojiKeywordClassArray []EmojiKeywordClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsEmojiKeyword returns copy with only EmojiKeyword constructors.
func ( EmojiKeywordClassArray) () ( EmojiKeywordArray) {
	for ,  := range  {
		,  := .(*EmojiKeyword)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsEmojiKeywordDeleted returns copy with only EmojiKeywordDeleted constructors.
func ( EmojiKeywordClassArray) () ( EmojiKeywordDeletedArray) {
	for ,  := range  {
		,  := .(*EmojiKeywordDeleted)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// EmojiKeywordArray is adapter for slice of EmojiKeyword.
type EmojiKeywordArray []EmojiKeyword

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// EmojiKeywordDeletedArray is adapter for slice of EmojiKeywordDeleted.
type EmojiKeywordDeletedArray []EmojiKeywordDeleted

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}