/*
Auto-generated by: https://github.com/pmndrs/gltfjsx
*/

import * as THREE from 'three'
import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei/useGLTF'

import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader'

type GLTFResult = GLTF & {
  nodes: {
    fuente_mesh: THREE.Mesh
    fuente_mesh_1: THREE.Mesh
    hamacas: THREE.Mesh
    lamp_mesh: THREE.Mesh
    lamp_mesh_1: THREE.Mesh
  }
  materials: {
    marble: THREE.MeshStandardMaterial
    water: THREE.MeshStandardMaterial
    black_metal: THREE.MeshStandardMaterial
    ['Material.001']: THREE.MeshStandardMaterial
  }
}

export default function Model(props: JSX.IntrinsicElements['group']) {
  const group = useRef<THREE.Group>()
  const { nodes, materials } = useGLTF('/model/park_props.glb') as GLTFResult
  return (
    <group ref={group} {...props} dispose={null}>
      <group position={[44.71, 1.96, 24.73]}>
        <mesh material={materials.marble} geometry={nodes.fuente_mesh.geometry} />
        <mesh material={materials.water} geometry={nodes.fuente_mesh_1.geometry} />
      </group>
      <mesh
        material={materials.black_metal}
        geometry={nodes.hamacas.geometry}
        position={[32.05, 1.14, 33.16]}
        rotation={[0, 0.44, 0]}
      />
      <group position={[17.11, 1.22, -25.95]} scale={[0.52, 0.52, 0.52]}>
        <mesh material={materials.black_metal} geometry={nodes.lamp_mesh.geometry} />
        <mesh
          material={materials['Material.001']}
          geometry={nodes.lamp_mesh_1.geometry}
        />
      </group>
      <group position={[40.48, 1.22, -2.41]} scale={[0.52, 0.52, 0.52]}>
        <mesh material={materials.black_metal} geometry={nodes.lamp_mesh.geometry} />
        <mesh
          material={materials['Material.001']}
          geometry={nodes.lamp_mesh_1.geometry}
        />
      </group>
      <group position={[50.76, 1.23, 14.09]} scale={[0.52, 0.52, 0.52]}>
        <mesh material={materials.black_metal} geometry={nodes.lamp_mesh.geometry} />
        <mesh
          material={materials['Material.001']}
          geometry={nodes.lamp_mesh_1.geometry}
        />
      </group>
      <group position={[38.38, 1.22, -21.31]} scale={[0.52, 0.52, 0.52]}>
        <mesh material={materials.black_metal} geometry={nodes.lamp_mesh.geometry} />
        <mesh
          material={materials['Material.001']}
          geometry={nodes.lamp_mesh_1.geometry}
        />
      </group>
      <group position={[30.36, 1.23, 29.05]} scale={[0.52, 0.52, 0.52]}>
        <mesh material={materials.black_metal} geometry={nodes.lamp_mesh.geometry} />
        <mesh
          material={materials['Material.001']}
          geometry={nodes.lamp_mesh_1.geometry}
        />
      </group>
      <group position={[59.38, 1.23, 36.05]} scale={[0.52, 0.52, 0.52]}>
        <mesh material={materials.black_metal} geometry={nodes.lamp_mesh.geometry} />
        <mesh
          material={materials['Material.001']}
          geometry={nodes.lamp_mesh_1.geometry}
        />
      </group>
    </group>
  )
}

useGLTF.preload('/model/park_props.glb')
