protected function getListOfStyleguideMainTables(): array
    {
        $prefixes = [
            'tx_styleguide_',
            'tx_styleguide_elements_',
            'tx_styleguide_inline_',
        ];
        $result = [];
        foreach ($GLOBALS['TCA'] as $tablename => $_) {
            if ($tablename === 'tx_styleguide_staticdata') {
                continue;
            }
            foreach ($prefixes as $prefix) {
                if (!StringUtility::beginsWith($tablename, $prefix)) {
                    continue;
                }

                // See if string after $prefix is only one _ separated segment
                $suffix = substr($tablename, strlen($prefix));
                $suffixArray = explode('_', $suffix);
                if (count($suffixArray) !==  1) {
                    continue;
                }

                // Found a main table
                $result[] = $tablename;

                // No need to scan other prefixes
                break;
            }
        }
        // Manual resorting - the "staticdata" table is used by other tables later.
        // We resort this on top so it is handled first and other tables can rely on
        // created data already. This is a bit hacky but a quick workaround.
        array_unshift($result, 'tx_styleguide_staticdata');
        return $result;
    }