code: private function getVisibleCondition($property)
      {
          $condition = $property->getVisibleCondition();
          if ($condition instanceof PropertyConditionChain) {
              return $condition;
          }
  
          $conditionChain = new PropertyConditionChain();
          $property->setVisibleCondition($conditionChain);
  
          if ($condition) {
              $conditionChain->addCondition($condition);
          }
  
          return $conditionChain;
      }
docs: Get the visible condition for a property. Create it if not exists.
  
  @param PropertyInterface $property Palette property.
  
  @return PropertyConditionChain