protected function getNamespaceSegments(string $name): array
    {
        $segments = \explode(FinderContract::HINT_PATH_DELIMITER, $name);

        if (\count($segments) !== 2) {
            throw new InvalidArgumentException(\sprintf('View [%s] has an invalid name.', $name));
        }

        if (! isset($this->hints[$segments[0]])) {
            throw new InvalidArgumentException(\sprintf('No hint path defined for [%s].', $segments[0]));
        }

        return $segments;
    }