private function getOperators(string $fieldName, LeafType $leafType, bool $isAssociation, bool $isCollection): array
    {
        $scalarOperators = [
            BetweenOperatorType::class,
            EqualOperatorType::class,
            GreaterOperatorType::class,
            GreaterOrEqualOperatorType::class,
            InOperatorType::class,
            LessOperatorType::class,
            LessOrEqualOperatorType::class,
            LikeOperatorType::class,
            NullOperatorType::class,
            GroupOperatorType::class,
        ];

        $associationOperators = [
            HaveOperatorType::class,
            EmptyOperatorType::class,
        ];

        $operatorKeys = [];
        if ($isAssociation) {
            $operatorKeys = array_merge($operatorKeys, $associationOperators);
        }

        if (!$isCollection) {
            $operatorKeys = array_merge($operatorKeys, $scalarOperators);
        }

        $operators = array_fill_keys($operatorKeys, $leafType);

        // Add custom filters if any
        if (isset($this->customOperators[$fieldName])) {
            foreach ($this->customOperators[$fieldName] as $filter) {
                /** @var LeafType $leafType */
                $leafType = $this->types->get($filter->type);
                $operators[$filter->operator] = $leafType;
            }

            unset($this->customOperators[$fieldName]);
        }

        return $operators;
    }