// Generated from "nativejstypes/Main.java"
@file:Suppress(
 "ALWAYS_NULL",
 "PARAMETER_NAME_CHANGED_ON_OVERRIDE",
 "SENSELESS_COMPARISON",
 "UNCHECKED_CAST",
 "UNNECESSARY_LATEINIT",
 "UNNECESSARY_NOT_NULL_ASSERTION",
 "UNREACHABLE_CODE",
 "UNUSED_ANONYMOUS_PARAMETER",
 "UNUSED_PARAMETER",
 "UNUSED_VARIABLE",
 "USELESS_CAST",
 "VARIABLE_IN_SINGLETON_WITHOUT_THREAD_LOCAL",
 "VARIABLE_WITH_REDUNDANT_INITIALIZER",
 "REDUNDANT_ELSE_IN_WHEN")

package nativejstypes

import javaemul.lang.*
import java.lang.Class
import kotlin.Any
import kotlin.Array
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmStatic
import kotlin.jvm.javaObjectType
import nativejstypes.Bar
import nativejstypes.Bar.Inner
import nativejstypes.BarInnerWithDotInName
import nativejstypes.Foo
import nativejstypes.Headers
import nativejstypes.TopLevel
import nativejstypes.TopLevel.Nested
import nativejstypes.TopLevelNestedReference

open class Main {
 companion object {
  @JvmStatic
  fun testNativeJsTypeWithNamespace(): Int {
   val foo: Foo = Foo()
   return foo.sum()
  }

  @JvmStatic
  fun testNativeJsTypeWithNamespaceJsProperties() {
   val foo: Foo = Foo()
   foo.x = 50
   foo.y = 5
  }

  @JvmStatic
  fun testNativeJsTypeWithoutNamespace(): Int {
   val bar: Bar = Bar(6, 7)
   val unused: Int = Bar.getStatic()
   return bar.product()
  }

  @JvmStatic
  fun testNativeJsTypeWithoutNamespaceJsProperties() {
   val bar: Bar = Bar(6, 7)
   bar.x = 50
   bar.y = 5
   Bar.f = 10
  }

  @JvmStatic
  fun testInnerNativeJsType() {
   val barInner: Inner = Inner(1)
   val barInnerWithDotInName: BarInnerWithDotInName = BarInnerWithDotInName(2)
   barInner.square()
   barInnerWithDotInName.square()
   Inner.getInnerStatic()
   BarInnerWithDotInName.getInnerStatic()
  }

  @JvmStatic
  fun testGlobalNativeJsType() {
   val header: Headers = Headers()
   header.append("Content-Type", "text/xml")
  }

  @JvmStatic
  fun testNativeTypeClassLiteral() {
   var o1: Any = Bar::class.javaObjectType
   o1 = Array::class.javaObjectType as Class<Array<Array<Bar?>?>>
  }

  @JvmStatic
  fun testNativeTypeObjectMethods() {
   val bar: Bar = Bar(6, 7)
   val unusedStr: String = bar.toString()
   val unusedHash: Int = bar.hashCode()
   val unusedEq: Boolean = bar.equals(
    Any(),
   )
  }

  @JvmStatic
  fun testTopLevel() {
   TopLevel.x = 2
   val nested: Nested = Nested()
   nested.x = 3
   val topLevelNestedReference: TopLevelNestedReference = TopLevelNestedReference()
   topLevelNestedReference.x = 4
  }
 }
}
