import { GLTFResult } from "@/types/scene";

interface StaticMeshesProps {
  nodes: GLTFResult["nodes"];
  materials: GLTFResult["materials"];
}

export const StaticMeshes = ({ nodes, materials }: StaticMeshesProps) => (
  <>
    <group
      position={[0.25, 0, 1.25]}
      rotation={[0, Math.PI / 2, 0]}
      scale={0.15}
    >
      <group position={[0, 9.35, 0]}>
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.Frame.geometry}
          material={materials.FrameMaterial}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.OfficeChairChasis.geometry}
          material={materials.OfficeChairChasisMaterial}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.Seat.geometry}
          material={materials.SeatMaterial}
        />
      </group>
    </group>
    <group
      position={[2.50415, 0.12973, 3.47808]}
      rotation={[0, -Math.PI / 2, 0]}
      scale={0.01}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Mouse.geometry}
        material={materials.PlasticMaterial}
        position={[-250, 415.5, -232.5]}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.CDSlot.geometry}
        material={materials.PlasticMaterial}
        position={[0, 0, 8.5]}
      />
      <group position={[8, 0, 8.5]}>
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.PCMesh.geometry}
          material={materials.PlasticMaterial}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.CDSlotLining.geometry}
          material={materials.CDSlotLiningMaterial}
        />
      </group>
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Keyboard.geometry}
        material={materials.PlasticMaterial}
        position={[-275, 413.49, -190]}
      />
    </group>
    <group position={[2.4, 4.275, 4.25]}>
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.MousepadMesh.geometry}
        material={materials.MousepadMaterial}
        rotation={[-Math.PI / 2, 0, 0]}
        scale={[100, 121.73563, 1.32215]}
      />
    </group>
    <group
      position={[4.125, 4.27318, 4.245]}
      rotation={[0, -Math.PI / 2, 0]}
      scale={3}
    >
      <group rotation={[-Math.PI / 2, 0, 0]} scale={100}>
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.DeskLampChasis.geometry}
          material={materials.DeskLampChasisMaterial}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.Arm.geometry}
          material={materials.ArmMaterial}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.Light.geometry}
          material={materials.LightMaterial}
        />
      </group>
    </group>
    <group
      position={[-5.5, 4.90808, -4.15]}
      rotation={[0, Math.PI / 2, 0]}
      scale={0.06}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Printer3DMesh.geometry}
        material={materials.Printer3DMaterial}
        position={[0, 6.59846, 0]}
      />
    </group>
    <group
      position={[3.81024, 3.85444, 6.13972]}
      rotation={[-Math.PI, -0.44331, -Math.PI]}
      scale={0.035}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Paper1.geometry}
        material={materials.PaperMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Paper2.geometry}
        material={materials.PaperMaterial}
      />
    </group>
    <group
      position={[2.08047, 4.30502, 6.90876]}
      rotation={[-Math.PI, -0.34208, -Math.PI]}
      scale={0.2}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.PenAccent.geometry}
        material={materials.PenAccentMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.PenBody.geometry}
        material={materials.PenBodyMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.PenTip.geometry}
        material={materials.TipMaterial}
      />
    </group>
    <group
      position={[2.22647, 4.69018, -3.38313]}
      rotation={[2.71601, 0.78387, -1.26107]}
      scale={0.01}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.HeadphonesBody.geometry}
        material={materials.HeadphonesBodyMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.HeadphonesAccent.geometry}
        material={materials.HeadphonesAccentMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Cover.geometry}
        material={materials.CoverMaterial}
      />
    </group>
    <group
      position={[3.67873, 4.51496, 3.10402]}
      rotation={[-Math.PI, 0.43633, -Math.PI]}
      scale={5}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.MugMesh.geometry}
        material={materials.MugMaterial}
        position={[0, 0.00112, 0]}
      />
    </group>
    <group
      position={[-1.5, 4.275, -4]}
      rotation={[0, Math.PI / 2, 0]}
      scale={[1.5, 1, 1.5]}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.DeskMatMesh.geometry}
        material={materials.DeskMatMaterial}
        rotation={[-Math.PI / 2, 0, 0]}
        scale={[100, 121.73563, 1.32215]}
      />
    </group>
    <group
      position={[1.00097, 4.26, -4.75722]}
      rotation={[0, -Math.PI / 2, 0]}
      scale={0.4}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.SolderingIronBody.geometry}
        material={materials.SolderingIronBodyMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.SolderingIronAccent.geometry}
        material={materials.SolderingIronAccentMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Sponge.geometry}
        material={materials.SpongeMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.IronGrip.geometry}
        material={materials.IronGripMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Switch.geometry}
        material={materials.SwitchMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.Holster.geometry}
        material={materials.HolsterMaterial}
      />
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.SwitchLabel.geometry}
        material={materials.SwitchLabelMaterial}
      />
    </group>
    <group
      position={[-5.67154, 0.12162, -2.214]}
      rotation={[0, -Math.PI / 4, 0]}
      scale={0.015}
    >
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.CalculatorMesh.geometry}
        material={materials.CalculatorMaterial}
        position={[-74.47193, 0, -82.42568]}
      />
    </group>
    <group
      position={[-1, 0.025, 1.25]}
      rotation={[0, Math.PI / 2, 0]}
      scale={3}
    >
      <group rotation={[-Math.PI / 2, 0, 0]} scale={100}>
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.MainRug.geometry}
          material={materials.RugDarkMaterial}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.Border.geometry}
          material={materials.RugLightMaterial}
        />
      </group>
    </group>
    <group rotation={[-Math.PI / 2, 0, 0]} scale={100}>
      <mesh
        castShadow
        receiveShadow
        geometry={nodes.LDeskMesh.geometry}
        material={materials.LDeskMaterial}
        position={[0, 0, 0.02012]}
        scale={5}
      />
    </group>
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.ScrewdriverMesh.geometry}
      material={materials.ScrewdriverMaterial}
      position={[0.8, 4.3682, -3]}
      rotation={[Math.PI, -Math.PI / 3, Math.PI]}
      scale={5}
    />
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.WalletMesh.geometry}
      material={materials.WalletMaterial}
      position={[3.95, 4.50877, -0.5]}
      rotation={[0, -Math.PI / 4, 0]}
      scale={0.5}
    />
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.PlantMesh.geometry}
      material={materials.PlantMaterial}
      position={[4, 4.27081, -5]}
      scale={0.25}
    />
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.Controller1Mesh.geometry}
      material={materials.Controller1Material}
      position={[-5.55, 2, -3.15]}
      scale={0.04}
    />
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.Controller2Mesh.geometry}
      material={materials.Controller2Material}
      position={[-5.55, 2, -4.15]}
      scale={0.04}
    />
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.Wall.geometry}
      material={materials.WallMaterial}
    />
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.Floor.geometry}
      material={materials.FloorMaterial}
    />
    <mesh
      geometry={nodes.WindowGlass.geometry}
      position={[-2.501, 7.682, -6.529]}
    >
      <meshStandardMaterial
        color="white"
        metalness={1}
        roughness={0}
        opacity={0.5}
        transparent
      />
    </mesh>
    <mesh
      castShadow
      receiveShadow
      geometry={nodes.WindowFrame.geometry}
      material={materials.WindowFrameMaterial}
    />
  </>
);
