import {memo} from 'react';

import Dialogues from './dialogues.jsx';
import Damages from './damages.jsx';

function Entity({camera, entity, scale}) {
  return (
    <>
      {entity.Interlocutor && (
        <Dialogues
          camera={camera}
          dialogues={entity.Interlocutor.dialogues}
          scale={scale}
        />
      )}
      {entity.Vulnerable && (
        <Damages
          camera={camera}
          damages={entity.Vulnerable.damages}
          scale={scale}
        />
      )}
    </>
  )
}

export default memo(Entity);
