private function getForm()
    {
        $rule = $this->ruleFactory->create();

        if ($this->getOptimizer() && $this->getOptimizer()->getRuleCondition()) {
            $rule = $this->getOptimizer()->getRuleCondition();
        }

        $form = $this->formFactory->create();
        $form->setHtmlId('rule_condition');

        $ruleConditionField = $form->addField(
            'rule_condition',
            'text',
            ['name' => 'rule_condition', 'label' => __('Rule conditions'), 'container_id' => 'rule_condition']
        );

        $ruleConditionField->setValue($rule);
        $ruleConditionRenderer = $this->getLayout()->createBlock('Smile\ElasticsuiteCatalogRule\Block\Product\Conditions');
        $ruleConditionField->setRenderer($ruleConditionRenderer);

        return $form;
    }