{% extends "/layouts/main.twig" %}

{% set active_menu = '/admin/settings' %}

{% block title p__('title', 'Settings')|title %}

{% block template %}
	<h1>{{ p__('heading', 'Settings') }}</h1>

	<div>
		<h2>{{ p__('heading', 'Common') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/general" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="settings-2"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'General') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Website and SEO') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/public-details" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="circles-relation"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Public details') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Address, contacts etc.') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/policies" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="shield-check"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Policies') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Legal terms') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/pwa" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="bolt"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'PWA') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Progressive Web App settings') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/features" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="apps"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Features') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Configure features') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/models" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="cpu"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Models') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Configure AI models') }}
					</p>
				</div>
			</a>

			{% for item in nav.admin.settings.common.items|default([]) %}
				<a href="{{ item.url }}" class="flex gap-4 items-center box hover:border-line">
					{% if item.icon %}
						<x-avatar icon="{{ item.icon }}"></x-avatar>
					{% endif %}

					<div>
						<div class="flex gap-2 items-center label">
							<h3>{{ p__('nav', item.label) }}</h3>

							<div class="flex gap-1 items-center">
								{% if item.isExperimental %}
									<i class="text-base cursor-auto ti ti-test-pipe text-content-dimmed hover:text-content" x-tooltip.raw="{{ __('Experimental') }}"></i>
								{% endif %}

								{% if item.isBuiltIn == false %}
									<i class="text-base cursor-auto ti ti-puzzle text-content-dimmed hover:text-content" x-tooltip.raw="{{ __('Plugin addition') }}"></i>
								{% endif %}
							</div>
						</div>
						<p class="mt-1 text-sm text-content-dimmed">
							{{ p__('nav', item.description) }}
						</p>
					</div>
				</a>
			{% endfor %}
		</div>
	</div>

	<div>
		<h2>{{ p__('heading', 'Branding') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/logo" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="brand-abstract"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Logo') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Logo and favicon') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/appearance" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="brush"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Appearance') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Color schemes etc.') }}
					</p>
				</div>
			</a>
		</div>
	</div>

	<div>
		<h2>{{ p__('heading', 'Finance') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/billing" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="file-invoice"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Billing') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Currency and subscriptions') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/payments" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="cash"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Payments') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Payment gateway integrations') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/credits" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="decimal"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Credit ratios') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Credit usage rates') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/rate-providers" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="exchange"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Exchange') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Currency exchange rate providers') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/affiliates" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<i class="ti ti-affiliate"></i>
				</span>

				<div>
					<h3>{{ p__('heading', 'Affiliates') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Affiliate program settings') }}
					</p>
				</div>
			</a>
		</div>
	</div>

	<div>
		<h2>{{ p__('heading', 'Email') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/mail" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="at"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Mail') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Transport and sender details') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/smtp" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="server-cog"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'SMTP') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('SMTP transport details') }}
					</p>
				</div>
			</a>
		</div>
	</div>

	<div>
		<h2>{{ p__('heading', 'User accounts') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/accounts" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="user-cog"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Account settings') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Accounts and sign up form') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/identity-providers" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="fingerprint"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Identity providers') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('3rd party identiy providers') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/recaptcha" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="scan"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'CAPTCHA') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Google reCAPTCHA') }}
					</p>
				</div>
			</a>
		</div>
	</div>

	<div>
		<h2>{{ p__('heading', 'Storage') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/storage" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="file-stack"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'File storage') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('File storage settings') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/cdn" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="cloud-upload"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Cloud storage') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Integrated cloud storage options') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/embeddings" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="vector"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Embeddings') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Embedding adapter and model') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/vector-databases" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="database"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Vector databases') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Configure vector database adapters') }}
					</p>
				</div>
			</a>
		</div>
	</div>

	<div>
		<h2>{{ p__('heading', 'Integrations') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/openai" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="brand-openai"></x-avatar>

				<div>
					<h3>OpenAI</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/cohere" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg xmlns="http://www.w3.org/2000/svg" width="218" height="224" viewbox="0 0 218 224">
						<path d="M70.7878 133.637C76.6687 133.637 88.367 133.305 104.537 126.48C123.38 118.525 160.869 104.085 187.913 89.2536C206.827 78.8799 215.117 65.1597 215.117 46.6833C215.118 21.0401 194.843 0.251953 169.833 0.251953H65.0456C29.1218 0.251953 0 30.111 0 66.9442C0 103.777 27.2666 133.637 70.7878 133.637Z" fill="currentColor"/>
						<path d="M88.5088 179.584C88.5088 161.529 99.1098 145.25 115.374 138.329L148.374 124.287C181.753 110.083 218.493 135.234 218.493 172.29C218.493 200.998 195.791 224.269 167.791 224.261L132.061 224.251C108.006 224.245 88.5088 204.249 88.5088 179.584Z" fill="currentColor"/>
						<path d="M37.4969 142.404H37.4962C16.7876 142.404 0 159.617 0 180.85V185.829C0 207.062 16.7876 224.275 37.4962 224.275H37.4969C58.2055 224.275 74.9932 207.062 74.9932 185.829V180.85C74.9932 159.617 58.2055 142.404 37.4969 142.404Z" fill="currentColor"/>
					</svg>
				</span>

				<div>
					<h3>Cohere</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/anthropic" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg viewbox="0 0 256 176" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveaspectratio="xMidYMid">
						<g fill="currentColor">
							<path d="M147.486878,0 C147.486878,0 217.568251,175.780074 217.568251,175.780074 C217.568251,175.780074 256,175.780074 256,175.780074 C256,175.780074 185.918621,0 185.918621,0 C185.918621,0 147.486878,0 147.486878,0 C147.486878,0 147.486878,0 147.486878,0 Z"></path>
							<path d="M66.1828124,106.221191 C66.1828124,106.221191 90.1624677,44.4471185 90.1624677,44.4471185 C90.1624677,44.4471185 114.142128,106.221191 114.142128,106.221191 C114.142128,106.221191 66.1828124,106.221191 66.1828124,106.221191 C66.1828124,106.221191 66.1828124,106.221191 66.1828124,106.221191 Z M70.0705318,0 C70.0705318,0 0,175.780074 0,175.780074 C0,175.780074 39.179211,175.780074 39.179211,175.780074 C39.179211,175.780074 53.5097704,138.86606 53.5097704,138.86606 C53.5097704,138.86606 126.817544,138.86606 126.817544,138.86606 C126.817544,138.86606 141.145724,175.780074 141.145724,175.780074 C141.145724,175.780074 180.324935,175.780074 180.324935,175.780074 C180.324935,175.780074 110.254409,0 110.254409,0 C110.254409,0 70.0705318,0 70.0705318,0 C70.0705318,0 70.0705318,0 70.0705318,0 Z"></path>
						</g>
					</svg>
				</span>

				<div>
					<h3>Anthropic / Claude AI</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/xai" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewbox="0 0 24 24" aria-hidden="true" class="w-6 h-6" focusable="false" style="fill:currentColor">
						<path d="m3.005 8.858 8.783 12.544h3.904L6.908 8.858zM6.905 15.825 3 21.402h3.907l1.951-2.788zM16.585 2l-6.75 9.64 1.953 2.79L20.492 2zM17.292 7.965v13.437h3.2V3.395z"></path>
					</svg>
				</span>

				<div>
					<h3>xAI / Grok</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/elevenlabs" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					II
				</span>

				<div>
					<h3>ElevenLabs</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/speechify" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg xmlns="http://www.w3.org/2000/svg" width="38" height="23" viewbox="0 0 38 23" fill="none">
						<path fill-rule="evenodd" clip-rule="evenodd" d="M8.43253 6.54201C9.37662 5.16239 10.1953 4.48023 11.4211 4.85917C12.1629 5.08848 12.4673 6.03536 12.1629 7.22346C11.6275 9.31251 11.4211 10.5117 11.4211 11.9389C13.3041 7.99222 16.7848 2.74677 18.2934 0.982492C19.3361 -0.236944 20.8307 -0.0814338 21.3933 0.190567C22.3075 0.632525 22.3558 1.59083 22.0402 2.50731C19.8571 8.84786 19.7811 12.2343 19.513 15.5242C20.8698 11.8755 22.5194 8.44332 24.5115 6.02612C25.3509 4.86676 26.8219 4.50282 27.7511 4.87944C28.6803 5.25606 28.8921 6.15712 28.6803 7.28627C28.128 10.2308 27.8539 11.6109 27.8539 12.7516C28.8629 11.9799 29.6663 11.3279 31.5031 11.1789C33.3399 11.0299 37.1359 11.7611 37.1359 11.7611C37.1359 11.7611 34.9445 12.1335 33.787 12.4173C31.4142 12.9991 30.5856 13.6796 29.0496 15.9292C28.6033 16.5828 27.8539 17.0847 27.0097 17.0209C26.1654 16.957 25.5985 16.4259 25.3509 15.7086C25.0066 14.7117 24.9043 13.2205 25.3509 9.99348C23.1625 13.3229 22.0402 17.8455 20.5408 20.8447C20.1574 21.6115 19.5027 22.4853 18.6154 22.4853C17.7281 22.4853 16.5774 22.1412 16.428 19.5049C16.0453 12.7516 17.3211 7.37759 17.3211 7.37759C14.8362 11.3176 14.0426 13.6142 13.1783 14.8118C12.3139 16.0094 11.4752 17.0465 10.455 17.0209C9.43478 16.9952 8.84103 15.8547 8.71194 14.8118C8.58284 13.7689 8.54569 12.4369 8.92275 9.99348C7.94125 10.975 7.07823 11.6397 5.53265 12.0559C3.98707 12.4722 2.14146 12.2073 0 11.7611C2.14146 11.7611 5.74519 10.4691 8.43253 6.54201Z" fill="currentColor"/>
					</svg>
				</span>

				<div>
					<h3>Speechify</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/gcp" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="brand-google"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Google Cloud Platform') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Google credentials for TTS etc.') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/azure" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="brand-azure"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Azure') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Credentials for Azure TTS etc.') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/falai" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg width="40" height="40" viewbox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
						<path opacity="0.22" d="M14.6154 31.8462H12.4616V34H14.6154V31.8462Z" fill="currentColor"/>
						<path opacity="0.85" d="M18.9224 23.2296H8.15329V25.3834H18.9224V23.2296Z" fill="currentColor"/>
						<path d="M18.9235 21.0764H10.3083V23.2302H18.9235V21.0764Z" fill="currentColor"/>
						<path opacity="0.4" d="M16.7692 29.6929H12.4616V31.8467H16.7692V29.6929Z" fill="currentColor"/>
						<path opacity="0.7" d="M18.9229 25.3863H6V27.5401H18.9229V25.3863Z" fill="currentColor"/>
						<path opacity="0.5" d="M18.923 27.5362H12.4616V29.69H18.923V27.5362Z" fill="currentColor"/>
						<path opacity="0.22" d="M14.6154 16.7698H12.4616V18.9236H14.6154V16.7698Z" fill="currentColor"/>
						<path opacity="0.85" d="M18.9224 8.15327H8.15329V10.3071H18.9224V8.15327Z" fill="currentColor"/>
						<path d="M18.9235 6H10.3083V8.1538H18.9235V6Z" fill="currentColor"/>
						<path opacity="0.4" d="M16.7692 14.6131H12.4616V16.7669H16.7692V14.6131Z" fill="currentColor"/>
						<path opacity="0.7" d="M18.9229 10.3066H6V12.4604H18.9229V10.3066Z" fill="currentColor"/>
						<path opacity="0.5" d="M18.923 12.4598H12.4616V14.6136H18.923V12.4598Z" fill="currentColor"/>
						<path opacity="0.22" d="M29.6918 31.8462H27.538V34H29.6918V31.8462Z" fill="currentColor"/>
						<path opacity="0.85" d="M33.9988 23.2296H23.2297V25.3834H33.9988V23.2296Z" fill="currentColor"/>
						<path d="M34 21.0764H25.3847V23.2302H34V21.0764Z" fill="currentColor"/>
						<path opacity="0.4" d="M31.8456 29.6929H27.538V31.8467H31.8456V29.6929Z" fill="currentColor"/>
						<path opacity="0.7" d="M33.9993 25.3863H21.0765V27.5401H33.9993V25.3863Z" fill="currentColor"/>
						<path opacity="0.5" d="M33.9995 27.5362H27.538V29.69H33.9995V27.5362Z" fill="currentColor"/>
						<path opacity="0.22" d="M29.6918 16.7698H27.538V18.9236H29.6918V16.7698Z" fill="currentColor"/>
						<path opacity="0.85" d="M33.9988 8.15327H23.2297V10.3071H33.9988V8.15327Z" fill="currentColor"/>
						<path d="M34 6H25.3847V8.1538H34V6Z" fill="currentColor"/>
						<path opacity="0.4" d="M31.8456 14.6131H27.538V16.7669H31.8456V14.6131Z" fill="currentColor"/>
						<path opacity="0.7" d="M33.9993 10.3066H21.0765V12.4604H33.9993V10.3066Z" fill="currentColor"/>
						<path opacity="0.5" d="M33.9995 12.4598H27.538V14.6136H33.9995V12.4598Z" fill="currentColor"/>
					</svg>
				</span>

				<div>
					<h3>Fal AI</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/luma" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg width="100%" height="100%" viewbox="0 0 121 141" fill="none" xmlns="http://www.w3.org/2000/svg">
						<path d="M0 35.6017L60.5 0.607422V140.607L0 105.606V35.6017Z" fill="currentColor" fill-opacity="0.3"></path>
						<path d="M60.5 140.598L0 105.596L60.5 70.594L121 105.596L60.5 140.598Z" fill="currentColor" fill-opacity="0.3"></path>
						<path d="M60.5 140.598L0 105.596L60.5 70.594L121 105.596L60.5 140.598Z" fill="currentColor" fill-opacity="0.3"></path>
						<path d="M0 35.6017L60.5 0.607422V140.607L0 105.606V35.6017Z" fill="currentColor" fill-opacity="0.3"></path>
						<path d="M60.5 140.598L0 105.596L60.5 70.594L121 105.596L60.5 140.598Z" fill="currentColor" fill-opacity="0.3"></path>
						<path d="M0 35.6017L60.5 0.607422V140.607L0 105.606V35.6017Z" fill="currentColor" fill-opacity="0.3"></path>
					</svg>
				</span>

				<div>
					<h3>Luma AI</h3>

					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/stabilityai" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					S.
				</span>

				<div>
					<h3>Stability AI</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/clipdrop" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					CD
				</span>

				<div>
					<h3>Clipdrop</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('API keys and service config') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/onesignal" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg width="32" height="32" viewbox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
						<path fill="currentColor" d="M15.972.838C7.585.855.752 7.74.8 16.127a15.201 15.201 0 0 0 13.657 15.035.174.174 0 0 0 .192-.175V16.04h-1.181a.175.175 0 0 1-.175-.175v-2.358a.175.175 0 0 1 .175-.175h3.707a.175.175 0 0 1 .175.175v17.481a.175.175 0 0 0 .192.175A15.201 15.201 0 0 0 15.972.838Zm4.32 26.938a.175.175 0 0 1-.234-.166v-2.495a.262.262 0 0 1 .15-.236 9.79 9.79 0 0 0-4.36-18.63c-5.2.08-9.466 4.273-9.631 9.471a9.802 9.802 0 0 0 5.578 9.159.263.263 0 0 1 .15.236v2.495a.174.174 0 0 1-.15.174.175.175 0 0 1-.083-.008 12.515 12.515 0 0 1-8.204-11.852c.06-6.787 5.606-12.328 12.395-12.378 6.935-.056 12.591 5.57 12.591 12.493 0 5.383-3.42 9.982-8.202 11.737Z"></path>
					</svg>
				</span>

				<div>
					<h3>OneSignal</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Push notifications') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/serper" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg viewbox="0 0 70 70" xmlns="http://www.w3.org/2000/svg">
						<path d="M35.6992 17.5264C37.571 17.5264 39.3369 17.8438 40.9971 18.4785C42.6735 19.1133 44.1383 19.9922 45.3916 21.1152C46.6449 22.2383 47.597 23.5404 48.248 25.0215C48.3945 25.347 48.4678 25.6807 48.4678 26.0225C48.4678 26.6898 48.2236 27.2676 47.7354 27.7559C47.2633 28.2279 46.6937 28.4639 46.0264 28.4639C45.5869 28.4639 45.1475 28.3255 44.708 28.0488C44.2686 27.7559 43.9593 27.4059 43.7803 26.999C43.1618 25.5993 42.1283 24.4844 40.6797 23.6543C39.2474 22.8242 37.5872 22.4092 35.6992 22.4092C34.7715 22.4092 33.7868 22.5231 32.7451 22.751C31.7197 22.9788 30.7513 23.3288 29.8398 23.8008C28.9284 24.2565 28.1878 24.8343 27.6182 25.5342C27.0485 26.234 26.7637 27.0479 26.7637 27.9756C26.7637 28.7243 27.0078 29.3753 27.4961 29.9287C27.9844 30.4658 28.5296 30.889 29.1318 31.1982C30.5479 31.8981 32.1104 32.3864 33.8193 32.6631C35.5446 32.9398 37.2861 33.2083 39.0439 33.4688C40.8018 33.7292 42.4375 34.1849 43.9512 34.8359C44.9115 35.2428 45.8311 35.8044 46.71 36.5205C47.5889 37.2367 48.305 38.1074 48.8584 39.1328C49.4118 40.1582 49.6885 41.3626 49.6885 42.7461C49.6885 44.5365 49.2572 46.1071 48.3945 47.458C47.5319 48.8089 46.4007 49.932 45.001 50.8271C43.6012 51.7223 42.0794 52.3978 40.4355 52.8535C38.8079 53.293 37.2129 53.5127 35.6504 53.5127C33.5345 53.5127 31.5488 53.179 29.6934 52.5117C27.8379 51.8281 26.2184 50.8678 24.835 49.6309C23.4515 48.3776 22.3936 46.9128 21.6611 45.2363C21.5146 44.9108 21.4414 44.5853 21.4414 44.2598C21.4414 43.5924 21.6774 43.0228 22.1494 42.5508C22.6377 42.0625 23.2155 41.8184 23.8828 41.8184C24.3385 41.8184 24.7861 41.9648 25.2256 42.2578C25.665 42.5345 25.9661 42.8844 26.1289 43.3076C26.8451 44.9515 28.0576 46.2536 29.7666 47.2139C31.4756 48.1579 33.4368 48.6299 35.6504 48.6299C37.0339 48.6299 38.4255 48.4264 39.8252 48.0195C41.2249 47.5964 42.3968 46.9535 43.3408 46.0908C44.3011 45.2119 44.7812 44.097 44.7812 42.7461C44.7812 41.8835 44.4883 41.1755 43.9023 40.6221C43.3327 40.0524 42.7061 39.6211 42.0225 39.3281C40.4762 38.6608 38.8242 38.2051 37.0664 37.9609C35.3086 37.7005 33.5589 37.432 31.8174 37.1553C30.0758 36.8623 28.4482 36.3333 26.9346 35.5684C25.6488 34.9173 24.4769 33.9733 23.4189 32.7363C22.3773 31.4831 21.8564 29.8962 21.8564 27.9756C21.8564 26.2829 22.2633 24.7936 23.0771 23.5078C23.9072 22.2057 24.9977 21.1152 26.3486 20.2363C27.7158 19.3411 29.2132 18.6657 30.8408 18.21C32.4684 17.7542 34.0879 17.5264 35.6992 17.5264Z" fill="currentColor"></path>
						<circle cx="35" cy="35" r="32" stroke="currentColor" stroke-width="6" fill="transparent"></circle>
					</svg>
				</span>

				<div>
					<h3>Serper</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Google search API') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/searchapi" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg width="76" height="64" viewbox="0 0 76 64" fill="none" xmlns="http://www.w3.org/2000/svg">
						<path d="M57.7423 59.289C57.7423 59.6275 57.6757 59.9627 57.5461 60.2755C57.4166 60.5883 57.2267 60.8725 56.9873 61.1118C56.748 61.3512 56.4638 61.5411 56.151 61.6706C55.8383 61.8001 55.5031 61.8668 55.1645 61.8668C52.5675 61.8638 50.0777 60.8309 48.2413 58.9945C46.4049 57.1581 45.3719 54.6683 45.3689 52.0712V41.0482C45.3703 40.3654 45.6425 39.711 46.1258 39.2287C46.609 38.7463 47.2639 38.4755 47.9467 38.4755C48.6295 38.4755 49.2844 38.7463 49.7677 39.2287C50.251 39.711 50.5232 40.3654 50.5245 41.0482V52.0712C50.5259 53.3014 51.0152 54.4808 51.885 55.3507C52.7549 56.2206 53.9343 56.7099 55.1645 56.7112C55.503 56.7112 55.8383 56.7778 56.151 56.9074C56.4638 57.0369 56.748 57.2268 56.9873 57.4662C57.2267 57.7056 57.4166 57.9897 57.5461 58.3025C57.6757 58.6153 57.7423 58.9505 57.7423 59.289ZM72.6935 42.6875C72.3549 42.6875 72.0197 42.7541 71.7069 42.8837C71.3942 43.0132 71.11 43.2031 70.8706 43.4425C70.6313 43.6818 70.4414 43.966 70.3118 44.2788C70.1823 44.5916 70.1156 44.9268 70.1157 45.2653C70.1157 46.4959 69.6268 47.6761 68.7566 48.5463C67.8865 49.4164 66.7063 49.9053 65.4757 49.9053C64.2451 49.9053 63.0649 49.4164 62.1947 48.5463C61.3245 47.6761 60.8357 46.4959 60.8357 45.2653V23.2C60.8357 17.047 58.3914 11.146 54.0405 6.79514C49.6897 2.44428 43.7887 0 37.6356 0C31.4826 0 25.5816 2.44428 21.2307 6.79514C16.8799 11.146 14.4356 17.047 14.4356 23.2V45.2653C14.4356 46.4959 13.9467 47.6761 13.0766 48.5462C12.2064 49.4164 11.0262 49.9053 9.79558 49.9053C8.56497 49.9053 7.38477 49.4164 6.5146 48.5462C5.64443 47.6761 5.15558 46.4959 5.15558 45.2653C5.15624 44.9263 5.09006 44.5906 4.96081 44.2772C4.83157 43.9639 4.6418 43.6791 4.40236 43.4392C4.16292 43.1993 3.87853 43.009 3.56544 42.8791C3.25236 42.7492 2.91674 42.6824 2.57779 42.6824C2.23884 42.6824 1.90323 42.7492 1.59014 42.8791C1.27706 43.009 0.99266 43.1993 0.753225 43.4392C0.513789 43.6791 0.324015 43.9639 0.194768 44.2772C0.0655213 44.5906 -0.000662587 44.9263 5.00043e-06 45.2653C0.00262818 47.8615 1.03582 50.3505 2.87256 52.1854C4.7093 54.0203 7.19935 55.0509 9.79558 55.0509C12.3918 55.0509 14.8819 54.0203 16.7186 52.1854C18.5553 50.3505 19.5885 47.8615 19.5912 45.2653V23.2C19.5912 18.4143 21.4923 13.8247 24.8763 10.4407C28.2603 7.05665 32.85 5.15554 37.6357 5.15554C42.4214 5.15554 47.011 7.05665 50.395 10.4407C53.779 13.8247 55.6802 18.4143 55.6802 23.2V45.2653C55.6828 47.8615 56.716 50.3505 58.5527 52.1854C60.3895 54.0203 62.8795 55.0509 65.4757 55.0509C68.072 55.0509 70.562 54.0203 72.3988 52.1854C74.2355 50.3505 75.2687 47.8615 75.2713 45.2653C75.2713 44.9267 75.2047 44.5915 75.0751 44.2788C74.9456 43.966 74.7557 43.6818 74.5163 43.4424C74.2769 43.2031 73.9927 43.0132 73.68 42.8836C73.3672 42.7541 73.032 42.6875 72.6935 42.6875ZM37.6356 41.2445C37.2971 41.2445 36.9619 41.3111 36.6491 41.4407C36.3363 41.5702 36.0521 41.7601 35.8128 41.9995C35.5734 42.2388 35.3835 42.523 35.254 42.8358C35.1245 43.1485 35.0578 43.4838 35.0578 43.8223V61.3512C35.0592 62.034 35.3313 62.6884 35.8146 63.1707C36.2979 63.653 36.9528 63.9239 37.6356 63.9239C38.3184 63.9239 38.9733 63.653 39.4566 63.1707C39.9399 62.6884 40.212 62.034 40.2134 61.3512V43.8223C40.2134 43.4838 40.1468 43.1486 40.0172 42.8358C39.8877 42.523 39.6978 42.2388 39.4584 41.9995C39.2191 41.7601 38.9349 41.5702 38.6221 41.4407C38.3093 41.3111 37.9741 41.2445 37.6356 41.2445ZM27.3245 38.4704C26.9859 38.4704 26.6507 38.537 26.338 38.6666C26.0252 38.7961 25.741 38.986 25.5016 39.2253C25.2623 39.4647 25.0724 39.7489 24.9429 40.0617C24.8133 40.3744 24.7467 40.7096 24.7467 41.0482V52.0712C24.7453 53.3014 24.2561 54.4808 23.3862 55.3507C22.5163 56.2206 21.3369 56.7099 20.1067 56.7112C19.423 56.7112 18.7673 56.9828 18.2839 57.4662C17.8005 57.9497 17.5289 58.6053 17.5289 59.289C17.5289 59.9727 17.8005 60.6283 18.2839 61.1118C18.7673 61.5952 19.423 61.8668 20.1067 61.8668C22.7037 61.8638 25.1936 60.8309 27.0299 58.9945C28.8663 57.1581 29.8993 54.6682 29.9023 52.0712V41.0482C29.9023 40.7096 29.8356 40.3744 29.7061 40.0617C29.5765 39.7489 29.3867 39.4647 29.1473 39.2253C28.9079 38.986 28.6237 38.7961 28.311 38.6666C27.9982 38.537 27.663 38.4704 27.3245 38.4704ZM30.418 19.5909C29.7042 19.5909 29.0065 19.8025 28.413 20.1991C27.8195 20.5957 27.3569 21.1593 27.0838 21.8187C26.8106 22.4782 26.7392 23.2038 26.8784 23.9039C27.0177 24.6039 27.3614 25.247 27.8661 25.7517C28.3708 26.2564 29.0138 26.6001 29.7139 26.7394C30.414 26.8786 31.1396 26.8071 31.799 26.534C32.4585 26.2608 33.0221 25.7983 33.4187 25.2048C33.8152 24.6113 34.0269 23.9136 34.0269 23.1998C34.0269 22.2427 33.6466 21.3247 32.9698 20.6479C32.293 19.9711 31.3751 19.5909 30.418 19.5909ZM48.4624 23.1998C48.4624 22.486 48.2508 21.7883 47.8542 21.1948C47.4577 20.6013 46.8941 20.1387 46.2346 19.8656C45.5752 19.5924 44.8495 19.521 44.1495 19.6602C43.4494 19.7995 42.8064 20.1432 42.3017 20.6479C41.797 21.1526 41.4532 21.7957 41.314 22.4957C41.1747 23.1958 41.2462 23.9214 41.5194 24.5809C41.7925 25.2403 42.2551 25.8039 42.8486 26.2005C43.442 26.597 44.1398 26.8087 44.8536 26.8087C45.8107 26.8087 46.7286 26.4285 47.4054 25.7517C48.0822 25.0749 48.4624 24.1569 48.4624 23.1998Z" fill="currentColor"/>
					</svg>

				</span>

				<div>
					<h3>Search API</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Google search & YouTube API') }}
					</p>
				</div>
			</a>

			<a href="admin/settings/script-tags" class="flex gap-4 items-center box hover:border-line">
				<x-avatar icon="code"></x-avatar>

				<div>
					<h3>{{ p__('heading', 'Script Tags') }}</h3>
					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Custom tags, Google Analytics etc.') }}
					</p>
				</div>
			</a>
		</div>
	</div>

	<div x-data="llm">
		<h2>{{ p__('heading', 'Custom LLM Servers') }}</h2>

		<div class="grid gap-2 mt-4 sm:grid-cols-2">
			<a href="admin/settings/ollama" class="flex gap-4 items-center box hover:border-line">
				<span class="avatar">
					<svg width="646" height="854" viewbox="0 0 646 854" fill="none" xmlns="http://www.w3.org/2000/svg">
						<path d="M140.629 0.239929C132.66 1.52725 123.097 5.69568 116.354 10.845C95.941 26.3541 80.1253 59.2728 73.4435 100.283C70.9302 115.792 69.2138 137.309 69.2138 153.738C69.2138 173.109 71.4819 197.874 74.7309 214.977C75.4665 218.778 75.8343 222.15 75.5278 222.395C75.2826 222.64 72.2788 225.092 68.9072 227.789C57.3827 236.984 44.2029 251.145 35.1304 264.08C17.7209 288.784 6.44151 316.86 1.72133 347.265C-0.117698 359.28 -0.608106 383.555 0.863118 395.57C4.11207 423.278 12.449 446.695 26.7321 468.151L31.391 475.078L30.0424 477.346C20.4794 493.407 12.3264 516.64 8.52575 538.953C5.522 556.608 5.15419 561.328 5.15419 584.99C5.15419 608.837 5.4607 613.557 8.28054 630.047C11.6521 649.786 18.5178 670.689 26.1804 684.605C28.6938 689.141 34.8239 698.581 35.5595 699.072C35.8047 699.194 35.0691 701.462 33.9044 704.098C25.077 723.408 17.537 749.093 14.4106 770.733C12.2038 785.567 11.8973 790.349 11.8973 805.981C11.8973 825.903 13.0007 835.589 17.1692 851.466L17.7822 853.795H44.019H70.3172L68.6007 850.546C57.9957 830.93 57.0149 794.517 66.1487 758.166C70.3172 741.369 75.0374 729.048 83.8647 712.067L89.1366 701.769V695.455C89.1366 689.57 89.014 688.896 87.1137 685.034C85.6424 682.091 83.6808 679.578 80.1866 676.145C74.2404 670.383 69.9494 664.314 66.5165 656.835C51.4365 624.1 48.494 575.489 59.0991 534.049C63.5128 516.762 70.8076 501.376 78.4702 492.978C83.6808 487.215 86.378 480.779 86.378 474.097C86.378 467.17 83.926 461.469 78.4089 455.523C62.5932 438.604 52.8464 418.006 49.3522 394.038C44.3868 359.893 53.3981 322.683 73.8726 293.198C93.9181 264.263 122.055 245.689 153.503 240.724C160.552 239.559 173.732 239.743 181.088 241.092C189.119 242.502 194.145 242.072 199.295 239.62C205.67 236.617 208.858 232.877 212.597 224.295C215.907 216.633 218.482 212.464 225.409 203.821C233.746 193.461 241.776 186.411 254.649 177.89C269.362 168.266 286.097 161.278 302.771 157.906C308.839 156.68 311.659 156.496 323 156.496C334.341 156.496 337.161 156.68 343.229 157.906C367.688 162.872 391.964 175.5 411.335 193.399C415.503 197.261 425.495 209.644 428.683 214.794C429.909 216.816 432.055 221.108 433.403 224.295C437.142 232.877 440.33 236.617 446.705 239.62C451.671 242.011 456.881 242.502 464.605 241.214C476.804 239.13 486.183 239.314 498.137 241.766C538.841 249.98 574.273 283.512 589.966 328.446C603.636 367.862 599.774 409.118 579.422 440.626C575.989 445.96 572.556 450.251 567.591 455.523C556.863 466.986 556.863 481.208 567.53 492.978C585.062 512.165 596.035 559.367 592.724 600.99C590.518 628.453 583.468 653.035 573.782 666.95C572.066 669.402 568.511 673.57 565.813 676.145C562.319 679.578 560.358 682.091 558.886 685.034C556.986 688.896 556.863 689.57 556.863 695.455V701.769L562.135 712.067C570.963 729.048 575.683 741.369 579.851 758.166C588.863 794.027 588.066 829.704 577.767 849.995C576.909 851.711 576.173 853.305 576.173 853.489C576.173 853.673 587.882 853.795 602.226 853.795H628.218L628.892 851.159C629.26 849.75 629.873 847.604 630.179 846.378C630.854 843.681 632.202 835.712 633.306 828.049C634.348 820.325 634.348 791.881 633.306 783.299C629.383 752.158 622.823 727.454 612.096 704.098C610.931 701.462 610.195 699.194 610.44 699.072C610.747 698.888 612.463 696.436 614.302 693.677C627.666 673.448 635.88 648.008 640.049 614.415C641.152 605.158 641.152 565.374 640.049 556.485C637.106 533.559 633.551 517.988 627.666 502.234C625.214 495.675 618.716 481.821 615.958 477.346L614.609 475.078L619.268 468.151C633.551 446.695 641.888 423.278 645.137 395.57C646.608 383.555 646.118 359.28 644.279 347.265C639.497 316.798 628.279 288.845 610.87 264.08C601.797 251.145 588.617 236.984 577.093 227.789C573.721 225.092 570.717 222.64 570.472 222.395C570.166 222.15 570.534 218.778 571.269 214.977C578.687 176.296 578.441 128.053 570.656 90.3524C563.913 57.4951 551.653 31.3808 535.837 16.3008C523.209 4.28578 510.336 -0.863507 494.888 0.11731C459.456 2.20154 430.89 42.9667 419.61 107.21C417.771 117.57 416.178 129.708 416.178 133.018C416.178 134.305 415.932 135.347 415.626 135.347C415.319 135.347 412.929 134.121 410.354 132.589C383.014 116.405 352.608 107.762 323 107.762C293.392 107.762 262.986 116.405 235.646 132.589C233.071 134.121 230.681 135.347 230.374 135.347C230.068 135.347 229.822 134.305 229.822 133.018C229.822 129.585 228.167 117.08 226.39 107.21C216.152 49.5259 192.674 11.3354 161.472 1.71112C157.181 0.423799 144.982 -0.434382 140.629 0.239929ZM151.051 50.139C159.878 57.1273 169.686 77.1114 175.326 99.4863C176.368 103.532 177.471 108.191 177.778 109.907C178.023 111.563 178.697 115.302 179.249 118.183C181.64 131.179 182.743 145.217 182.866 162.32L182.927 179.178L178.697 185.43L174.468 191.744H164.598C153.074 191.744 141.61 193.216 130.637 196.158C126.714 197.139 122.913 198.12 122.178 198.304C121.013 198.549 120.829 198.181 120.155 193.154C116.538 165.875 116.722 135.654 120.707 110.52C125.12 82.5059 135.419 57.1273 145.472 49.6486C147.863 47.8708 148.292 47.9321 151.051 50.139ZM500.589 49.7098C506.658 54.1848 513.34 66.0772 518.305 81.2798C528.297 111.685 531.117 153.431 525.845 193.154C525.171 198.181 524.987 198.549 523.822 198.304C523.087 198.12 519.286 197.139 515.363 196.158C504.39 193.216 492.926 191.744 481.402 191.744H471.532L467.303 185.43L463.073 179.178L463.134 162.32C463.257 138.535 465.464 119.961 470.735 99.3024C476.314 77.1114 486.183 57.1273 494.949 50.139C497.708 47.9321 498.137 47.8708 500.589 49.7098Z" fill="currentColor"/>
						<path d="M313.498 358.237C300.195 359.525 296.579 360.015 290.203 361.303C279.843 363.448 265.989 368.23 256.365 372.95C222.895 389.317 199.846 416.596 192.796 448.166C191.386 454.419 191.202 456.503 191.202 467.047C191.202 477.468 191.386 479.736 192.735 485.682C202.114 526.938 240.12 557.405 289.284 562.983C299.95 564.148 346.049 564.148 356.715 562.983C396.193 558.508 430.154 537.114 445.418 507.076C449.463 499.046 451.425 493.835 453.264 485.682C454.613 479.736 454.797 477.468 454.797 467.047C454.797 456.503 454.613 454.419 453.203 448.166C442.965 402.313 398.461 366.207 343.903 359.341C336.792 358.483 318.157 357.747 313.498 358.237ZM336.424 391.585C354.631 393.547 372.96 400.045 387.672 409.853C395.58 415.125 406.737 426.159 411.518 433.393C417.403 442.342 420.774 451.476 422.307 462.572C422.981 467.66 422.614 471.522 420.774 479.736C417.893 491.996 408.943 504.808 396.867 513.758C391.227 517.865 379.519 523.812 372.347 526.141C358.738 530.493 349.849 531.29 318.095 531.045C297.376 530.861 293.697 530.677 287.751 529.574C267.461 525.773 251.4 517.681 239.753 505.36C230.312 495.429 226.021 486.357 223.692 471.706C222.65 464.901 224.611 453.622 228.596 444.12C233.439 432.534 245.944 418.129 258.327 409.853C272.671 400.29 291.552 393.486 308.9 391.647C315.582 390.911 329.742 390.911 336.424 391.585Z" fill="currentColor"/>
						<path d="M299.584 436.336C294.925 438.849 291.676 445.224 292.657 449.944C293.76 455.032 298.235 460.182 305.223 464.412C308.963 466.68 309.208 466.986 309.392 469.254C309.514 470.603 309.024 474.465 308.35 477.898C307.614 481.269 307.062 484.825 307.062 485.806C307.124 488.442 309.576 492.733 312.15 494.817C314.419 496.656 314.848 496.717 321.223 496.901C327.047 497.085 328.273 496.962 330.602 495.859C336.61 492.916 338.142 487.522 335.935 477.162C334.096 468.519 334.464 467.17 339.062 464.534C343.904 461.714 349.054 456.749 350.586 453.377C353.529 446.941 350.831 439.646 344.333 436.274C342.74 435.477 340.778 435.11 337.897 435.11C333.422 435.11 330.541 436.152 325.269 439.523L322.265 441.424L320.365 440.259C312.58 435.661 311.17 435.11 306.449 435.171C303.078 435.171 301.239 435.477 299.584 436.336Z" fill="currentColor"/>
						<path d="M150.744 365.165C139.894 368.598 131.802 376.567 127.634 387.908C125.611 393.303 124.63 401.824 125.488 406.421C127.511 417.394 136.522 427.386 146.76 430.145C159.633 433.516 169.257 431.309 177.778 422.85C182.743 418.007 185.441 413.777 188.138 406.911C190.099 402.069 190.222 401.211 190.222 394.345L190.283 386.989L187.709 381.717C183.601 373.38 176.184 367.188 167.602 364.92C162.759 363.694 154.974 363.756 150.744 365.165Z" fill="currentColor"/>
						<path d="M478.153 364.982C469.755 367.25 462.276 373.502 458.291 381.717L455.717 386.989L455.778 394.345C455.778 401.211 455.901 402.069 457.862 406.911C460.56 413.777 463.257 418.007 468.222 422.85C476.743 431.309 486.367 433.516 499.241 430.145C506.658 428.183 514.075 421.93 517.631 414.635C520.696 408.444 521.431 403.969 520.451 396.919C518.183 380.797 508.742 369.089 494.704 364.982C490.597 363.756 482.628 363.756 478.153 364.982Z" fill="currentColor"/>
					</svg>
				</span>

				<div>
					<div class="flex gap-1 items-center">
						<h3>Ollama</h3>
						<i class="text-base cursor-auto ti ti-test-pipe text-content-dimmed hover:text-content" x-tooltip.raw="{{ __('Experimental') }}"></i>
					</div>

					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Local LLM server for various models') }}
					</p>
				</div>
			</a>

			{% for llm in config.model.registry.directory|filter(llm => llm.custom ?? false and llm.key != 'ollama') %}
				<div class="flex gap-4 items-center box hover:border-line group" x-ref="llm-{{ llm.key }}">
					<a href="admin/settings/llms/{{ llm.key }}" class="flex gap-4 items-center grow">
						<x-avatar title="{{ llm.name ?? __('Untitled') }}"></x-avatar>

						<div>
							<div class="flex gap-1 items-center">
								<h3 class="{{ llm.name ? '' : 'text-content-dimmed' }}">{{ llm.name ?? __('Untitled') }}</h3>
								<i class="text-base cursor-auto ti ti-info-square-rounded-filled text-content-dimmed hover:text-content" x-tooltip.raw="{{ __('Custom LLM server') }}"></i>
							</div>

							<p class="mt-1 text-sm text-content-dimmed">
								{{ __('Custom OpenAI compatible LLM server') }}
							</p>
						</div>
					</a>

					<button type="button" class="text-2xl ms-auto opacity-0 transition-all group-hover:opacity-100 ti ti-trash text-content-dimmed hover:text-content" x-tooltip.raw="{{ __('Delete') }}" @click.prevent="currentResource = `{{ llm.key }}`; modal.open('llm-delete-modal')"></button>
				</div>
			{% endfor %}

			<a href="admin/settings/llms" class="flex relative gap-4 items-center border-transparent box hover:border-line group">
				<svg class="absolute top-0 left-0 w-full h-full rounded-lg stroke-2 stroke-line text-line group-hover:hidden" width="100%" height="100%" fill="none" xmlns="http://www.w3.org/2000/svg">
					<rect cx="56" width="100%" height="100%" stroke-dasharray="4 4" rx="8" ry="8"/>
				</svg>

				<span class="avatar">
					<i class="ti ti-plus"></i>
				</span>

				<div>
					<div class="flex gap-1 items-center">
						<h3>New server</h3>
						<i class="text-base cursor-auto ti ti-test-pipe text-content-dimmed hover:text-content" x-tooltip.raw="{{ __('Experimental') }}"></i>
					</div>

					<p class="mt-1 text-sm text-content-dimmed">
						{{ __('Custom OpenAI compatible LLM server') }}
					</p>
				</div>
			</a>
		</div>

		<modal-element name="llm-delete-modal">
			<template x-if="currentResource">
				<form class="modal" @submit.prevent="deleteLlmServer(currentResource);">
					<div class="flex relative justify-center items-center mx-auto w-24 h-24 rounded-full text-failure/25">

						<svg class="absolute top-0 left-0 w-full h-full" width="112" height="112" viewbox="0 0 112 112" fill="none" xmlns="http://www.w3.org/2000/svg">
							<circle cx="56" cy="56" r="55.5" stroke="currentColor" stroke-dasharray="8 8"/>
						</svg>

						<div class="flex justify-center items-center w-20 h-20 text-4xl rounded-full transition-all bg-failure/25 text-failure">
							<i class="text-4xl ti ti-trash"></i>
						</div>
					</div>

					<div class="mt-4 text-lg text-center">
						{{ __('Are you sure you want to delete the LLM server?') }}
					</div>

					<div class="flex gap-4 justify-center items-center mt-10">
						<button class="button button-outline" @click="modal.close()" type="button">
							{{ p__('button', 'No, cancel') }}
						</button>

						<button class="button button-failure" type="submit" :processing="isDeleting">
							{% include "/snippets/spinner.twig" %}

							{{ p__('button', 'Yes, delete') }}
						</button>
					</div>
				</form>
			</template>
		</modal-element>
	</div>

{% endblock %}
