@php $current_url = url()->current(); $base_class = 'lqd-titlebar pt-6 transition-colors'; $container_base_class = 'lqd-titlebar-container flex flex-wrap items-center justify-between gap-y-4'; $before_base_class = 'lqd-titlebar-before w-full lg:w-1/3 flex'; $after_base_class = 'lqd-titlebar-after py-9 w-full'; $pretitle_base_class = 'lqd-titlebar-pretitle text-xs text-foreground/70 m-0'; $title_base_class = 'lqd-titlebar-title m-0'; $subtitle_base_class = 'lqd-titlebar-subtitle m-0 text-lg w-auto shrink lg:max-w-[65%] text-center'; $actions_base_class = 'lqd-titlebar-actions flex items-center gap-2 w-full lg:justify-end max-lg:hidden'; $generator_link = route('dashboard.user.openai.list') === $current_url ? '#lqd-generators-filter-list' : (route('dashboard.user.openai.list')); if (!$setting->feature_ai_writer) { $generator_link = route('dashboard.index'); } $wide_container_px = Theme::getSetting('wideLayoutPaddingX', ''); $has_title = true; $has_pretitle = true; $has_subtitle = view()->hasSection('titlebar_subtitle') && !blank(view()->getSection('titlebar_subtitle')); $titlebar_after_in_nav_col = $attributes->has('titlbar-after-place') && $attributes->get('titlbar-after-place') === 'col-nav'; $title_section_name = ''; $actions_empty = false; if (view()->hasSection('titlebar_title')) { $title_section_name = 'titlebar_title'; } elseif (view()->hasSection('title')) { $title_section_name = 'title'; } if ($attributes->has('title') && blank($attributes->get('title'))) { $has_title = false; } if ($attributes->has('pretitle') && blank($attributes->get('pretitle'))) { $has_pretitle = false; } if (!$attributes->get('layout-wide')) { $container_base_class .= ' container'; } else { $container_base_class .= ' container-fluid'; if (!empty($wide_container_px)) { $container_base_class .= ' ' . $wide_container_px; } } if (view()->hasSection('titlebar_actions') && blank(view()->getSection('titlebar_actions'))) { $actions_empty = true; $actions_base_class .= ' actions-empty'; } @endphp
withoutTwMergeClasses()->twMerge($base_class, $attributes->get('class')) }} >
twMergeFor('container', $container_base_class) }}>
@if (view()->hasSection('titlebar_before') || !empty($before))
twMergeFor('before', $before_base_class) }}> @if (view()->hasSection('titlebar_before')) @yield('titlebar_before') @elseif (!empty($before)) {{ $before }} @endif
@else @endif
@if ($has_title)

twMergeFor('title', $title_base_class, !$has_subtitle ? 'lg:-mb-8' : '') }}> @yield($title_section_name)

@endif
@hasSection('titlebar_actions_before') @yield('titlebar_actions_before') @endif @if (view()->hasSection('titlebar_actions'))
twMergeFor('actions', $actions_base_class) }}> @yield('titlebar_actions')
@elseif (!empty($actions))
twMergeFor('actions', $actions_base_class, $actions->attributes->get('class')) }}> {{ $actions }}
@else
twMergeFor('actions', $actions_base_class) }}> @if (request()->routeIs('dashboard.user.openai.documents.all') && !isset($currfolder)) {{ __('New Folder') }} @includeIf('panel.user.openai.components.modals.create-new-folder') @else {{ __('My Documents') }} @endif {{ __('New') }}
@endif @hasSection('titlebar_actions_after') @yield('titlebar_actions_after') @endif
@if ($has_subtitle)

twMergeFor('subtitle', $subtitle_base_class) }}> @yield('titlebar_subtitle')

@endif
@php $status_titlebar_after = $titlebar_after_in_nav_col && (!$has_pretitle && !$has_subtitle) && (view()->hasSection('titlebar_after') || !empty($after)); @endphp @if ($status_titlebar_after || (!$titlebar_after_in_nav_col && (($has_pretitle || $has_subtitle) && (view()->hasSection('titlebar_after') || !empty($after)))))
twMergeFor('container', $container_base_class) }}>
twMergeFor('after', $after_base_class) }}> @if (view()->hasSection('titlebar_after')) @yield('titlebar_after') @elseif (!empty($after)) {{ $after }} @endif
@endif