protected function parse(array $choices)
    {
        $items = [];

        foreach ($choices as $key => $value) {
            if (is_array($value)) {
                $items[$key] = $this->parse($value);
            } else {
                if (is_int($key)) {
                    $label = ucfirst(str_replace(['-', '_'], ' ', $value));
                } else {
                    $label = $key;
                }

                $items[$label] = $value;
            }
        }

        return $items;
    }