public function buildAttributeRow($key, array $group = []) {
    $weight = isset($group['weight']) ? $group['weight'] : 0;
    $row = [];

    $row['enabled'] = [
      '#type' => 'checkbox',
      '#default_value' => isset($group['enabled']) ? $group['enabled'] : 0,
    ];

    $row['name'] = [
      '#plain_text' => $key,
    ];

    $row['label'] = [
      '#type' => 'textfield',
      '#default_value' => isset($group['label']) ? $group['label'] : '',
    ];

    $row['weight'] = [
      '#type' => 'weight',
      '#title' => t('Weight'),
      '#title_display' => 'invisible',
      '#default_value' => $weight,
      '#attributes' => ['class' => ['weight']],
    ];

    $row['#attributes']['class'][] = 'draggable';
    return $row;
  }