@extends('frontend::pages.index')
@section('title')
{{ $data['title'] }}
@endsection
@section('meta_keywords')
{{ $data['meta_keywords'] }}
@endsection
@section('meta_description')
{{ $data['meta_description'] }}
@endsection
@section('page-content')
@php
$schemas = \App\Models\Schema::where('status',true)->with('schedule')->get();
@endphp


<section class="td-pricing-section inner-pages_space-top section_space-bottom p-relative z-index-11 section_space">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-xxl-6 col-xl-6 col-lg-8">
                <div class="section-title-wrapper text-center section_title_space">
                    <span class="section-subtitle">{{ $data['title_small'] }}</span>
                    <h2 class="section-title has_fade_anim">{{ $data['title_big'] }}</h2>
                </div>
            </div>
        </div>
        <div class="row gy-30">
            @foreach($schemas as $schema)
            <div class="col-xxl-3 col-xl-3 col-lg-4">
                <div class="has_fade_anim" data-delay="0.15">
                    <div class="investment-item">
                        <div class="plan-heading">
                            <h5 class="title">{{ $schema->name }}</h5>
                            @if($schema->interest_type == 'fixed')
                                <span class="info-badge">
                                {{ $schema->schedule->name . ' ' }}
                                    {{ $schema->roi_interest_type == 'percentage' ? $schema->fixed_roi . '%' : '$' . $schema->fixed_roi }}
                            </span>
                            @else
                                <span class="info-badge">
                                {{ $schema->schedule->name . ' ' }}
                                    {{ $schema->roi_interest_type == 'percentage'
                                        ? $schema->min_roi . '%' . ' - ' . $schema->max_roi . '%'
                                        : '$' . $schema->min_roi . ' - $' . $schema->max_roi }}
                            </span>
                            @endif
                        </div>
                        <div class="plan-list">
                            <ul>
                                <li>
                                    <div class="plan-content-list">
                                        <div class="list-info">
                                            <img src="{{ asset('frontend/theme_base/coin_orbit/images/icons/check.png') }}" alt="check">
                                            <span>{{ __('Investment') }}</span>
                                        </div>
                                        <span class="price-info">{{ $schema->type == 'range' ? $currencySymbol . $schema->min_amount . '-' . $currencySymbol . $schema->max_amount : $currencySymbol . $schema->fixed_amount }}</span>
                                    </div>
                                </li>
                                <li>
                                    <div class="plan-content-list">
                                        <div class="list-info">
                                            <img src="{{ asset('frontend/theme_base/coin_orbit/images/icons/check.png') }}" alt="check">
                                            <span>{{ __('Return Type') }}</span>
                                        </div>
                                        <span class="price-info">{{ ucwords($schema->return_type) }}</span>
                                    </div>
                                </li>
                                <li>
                                    <div class="plan-content-list">
                                        <div class="list-info">
                                            <img src="{{ asset('frontend/theme_base/coin_orbit/images/icons/check.png') }}" alt="check">
                                            <span>{{ __('Periods') }}</span>
                                        </div>
                                        <span class="price-info">
                                            {{ ($schema->return_type == 'period' ? $schema->number_of_period.' ' : __('Unlimited').' ' )  }}

                                            @if(($schema->number_of_period == 1 && $schema->return_type == 'period'))
                                                {{ __('Time') }}
                                            @elseif($schema->return_type == 'period')
                                                {{ __('Times') }}
                                            @endif
                                        </span>
                                    </div>
                                </li>
                                <li>
                                    <div class="plan-content-list">
                                        <div class="list-info">
                                            <img src="{{ asset('frontend/theme_base/coin_orbit/images/icons/check.png') }}" alt="check">
                                            <span>{{ __('Profit withdraw') }}</span>
                                        </div>
                                        <span class="price-info">{{ __('Anytime') }}</span>
                                    </div>
                                </li>
                                <li>
                                    <div class="plan-content-list">
                                        <div class="list-info">
                                            <img src="{{ asset('frontend/theme_base/coin_orbit/images/icons/check.png') }}" alt="check">
                                            <span>{{ __('Cancel') }}</span>
                                        </div>
                                        <span class="price-info">
                                            @if($schema->schema_cancel)
                                                {{ __('In').' '. $schema->expiry_minute .' '. ($schema->expiry_minute == 1 ? __('Minute') : __('Minutes')) }}
                                            @else
                                                {{ __('No') }}
                                            @endif
                                        </span>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="btn-inner">
                            <a class="td-btn gradient-btn btn-sm radius-8 w-100" href="{{route('user.schema.preview',$schema->id)}}">
                                    <span class="btn-icon"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                       <path d="M9.107 5.448C9.705 3.698 12.123 3.645 12.832 5.289L12.892 5.449L13.699 7.809C14.0732 8.90406 14.9033 9.7834 15.975 10.22L16.192 10.301L18.552 11.107C20.302 11.705 20.355 14.123 18.712 14.832L18.552 14.892L16.192 15.699C15.0966 16.0729 14.2168 16.9031 13.78 17.975L13.699 18.191L12.893 20.552C12.295 22.302 9.877 22.355 9.169 20.712L9.107 20.552L8.301 18.192C7.92706 17.0966 7.09692 16.2168 6.025 15.78L5.809 15.699L3.449 14.893C1.698 14.295 1.645 11.877 3.289 11.169L3.449 11.107L5.809 10.301C6.90406 9.92681 7.7834 9.09671 8.22 8.025L8.301 7.809M11 6.094L10.194 8.454C9.62401 10.1245 8.34742 11.4592 6.704 12.103L6.454 12.194L4.094 13L6.454 13.806C8.12445 14.376 9.4592 15.6526 10.103 17.296L10.194 17.546L11 19.906L11.806 17.546C12.376 15.8755 13.6526 14.5408 15.296 13.897L15.546 13.807L17.906 13L15.546 12.194C13.8755 11.624 12.5408 10.3474 11.897 8.704L11.807 8.454M19 2C19.3817 2 19.7301 2.21726 19.898 2.56L19.946 2.677L20.296 3.703L21.323 4.053C21.7064 4.18326 21.9734 4.5319 21.9993 4.93602C22.0251 5.34014 21.8047 5.71995 21.441 5.898L21.323 5.946L20.297 6.296L19.947 7.323C19.8165 7.70631 19.4677 7.9731 19.0636 7.99872C18.6595 8.02435 18.2799 7.80376 18.102 7.44L18.054 7.323L17.704 6.297L16.677 5.947C16.2936 5.81674 16.0266 5.4681 16.0007 5.06398C15.9749 4.65986 16.1953 4.28005 16.559 4.102L16.677 4.054L17.703 3.704L18.053 2.677C18.1912 2.27192 18.572 1.99974 19 2Z" fill="white"></path>
                                       </svg>
                                    </span>
                                <span class="btn-text">{{ __('Invest Now') }}</span>
                            </a>
                        </div>
                        <div class="bottom-contents">
                            <p class="description">* @if( null != $schema->off_days)
                                    {{ implode(', ', json_decode($schema->off_days,true))  .' '.__('are')}}
                                @else
                                    {{ __('No Profit') }}
                                @endif {{ __('Holidays') }}</p>
                        </div>
                    </div>
                </div>
            </div>
                @endforeach
        </div>
    </div>
    <div class="price-bg">
        <img src="{{ asset('frontend/theme_base/coin_orbit/images/bg/price-bg.png') }}" alt="Price Glow">
    </div>
</section>
<!-- Pricing section end -->

@include('frontend::home.include.__newsletter')
@endsection