@props([ 'toolKey', 'relatedSlug' => null, 'relatedSlug2' => null, ]) @php $locale = app()->getLocale(); $howToTitle = __('tools.' . $toolKey . '.how_to_title'); $howToSteps = __('tools.' . $toolKey . '.how_to_steps'); $specsTitle = __('tools.' . $toolKey . '.specs_title'); $specs = __('tools.' . $toolKey . '.specs'); $examplesTitle = __('tools.' . $toolKey . '.examples_title'); $examples = __('tools.' . $toolKey . '.examples'); $faqTitle = __('tools.' . $toolKey . '.faq_title'); $faq = __('tools.' . $toolKey . '.faq'); $relatedContext = __('tools.' . $toolKey . '.related_context'); $limitationsTitle = \Illuminate\Support\Facades\Lang::has('tools.' . $toolKey . '.limitations_title') ? __('tools.' . $toolKey . '.limitations_title') : (\Illuminate\Support\Facades\Lang::has('tools.' . $toolKey . '.security_title') ? __('tools.' . $toolKey . '.security_title') : null); $limitationsText = \Illuminate\Support\Facades\Lang::has('tools.' . $toolKey . '.limitations_text') ? __('tools.' . $toolKey . '.limitations_text') : (\Illuminate\Support\Facades\Lang::has('tools.' . $toolKey . '.security_text') ? __('tools.' . $toolKey . '.security_text') : null); $privacyTitle = __('tools.' . $toolKey . '.privacy_title'); $privacyText = __('tools.' . $toolKey . '.privacy_text'); $registry = app(\App\Support\Tools\ToolRegistry::class); $relatedTool1 = $relatedSlug ? $registry->find($relatedSlug) : null; $relatedTool2 = $relatedSlug2 ? $registry->find($relatedSlug2) : null; @endphp
@if(is_array($howToSteps) && count($howToSteps) > 0)

1 {{ $howToTitle }}

@foreach($howToSteps as $idx => $step)
{{ $idx + 1 }}

{{ $step }}

@endforeach
@endif @if(is_array($specs) && count($specs) > 0)

2 {{ $specsTitle }}

@foreach($specs as $label => $value) @endforeach
{{ $locale === 'bn' ? 'বৈশিষ্ট্য / প্যারামিটার' : 'Specification' }} {{ $locale === 'bn' ? 'মান ও নির্দেশিকা' : 'Details & Capabilities' }}
{{ $label }} {{ $value }}
@endif @if(is_array($examples) && count($examples) > 0)

3 {{ $examplesTitle }}

@foreach($examples as $ex)
{{ $ex['label'] ?? 'Example' }}
{{ $locale === 'bn' ? 'ইনপুট:' : 'Input:' }}

{{ $ex['input'] }}

{{ $locale === 'bn' ? 'ফলাফল:' : 'Result:' }}

{{ $ex['output'] }}

@endforeach
@endif

{{ $locale === 'bn' ? 'গোপনীয়তা ও সীমাবদ্ধতা' : 'Trust and Privacy' }}

@if($limitationsTitle && $limitationsText)

{{ $limitationsTitle }}

{{ $limitationsText }}

@endif @if($privacyTitle && $privacyText)

{{ $privacyTitle }}

{{ $privacyText }}

@endif
@if(is_array($faq) && count($faq) > 0)

4 {{ $faqTitle }}

@foreach($faq as $item)

Q. {{ $item['q'] }}

{{ $item['a'] }}

@endforeach
@endif @if($relatedTool1) @endif