@component('yas_member::emails.consignment-layout')
<div style="margin-bottom: 34px;">
    <p style="font-weight: bold;font-size: 20px;color: #121A26;line-height: 24px;margin-bottom: 24px">
        @lang('member::app.consignment.dear_admin') 👋
    </p>

    <p style="font-size: 16px;color: #384860;line-height: 24px;">
        @lang('member::app.member.emails.consignment-approved.description')
    </p>
</div>

    <div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
        <div style="line-height: 25px;">

            <div style="font-size: 16px;font-weight: 400;color: #384860;margin-bottom: 40px;">
                <strong>@lang('member::app.consignment.status'): {{ $consignment->status ?? '-' }}</strong><br/>

                <strong>@lang('member::app.consignment.consignment_no'):</strong> {{ $consignment->consignment_no ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.name'):</strong> {{ $consignment->name ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.email'):</strong> {{ $consignment->email ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.phone-number'):</strong> {{ $consignment->contact ?? '-' }}<br/>


                <strong>@lang('member::app.consignment.brand'):</strong> {{ $consignment->brand_label ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.model'):</strong> {{ $consignment->model ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.material'):</strong> {{ $consignment->material ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.color'):</strong> {{ $consignment->color ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.hardware'):</strong> {{ $consignment->hardware ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.stamp'):</strong> {{ $consignment->stamp ?? '-' }}<br/>
                <strong>@lang('member::app.consignment.condition'):</strong> {{ $consignment->condition ?? '-' }}<br/>

                <strong>@lang('member::app.consignment.price'):</strong> <strong>@lang('member::app.consignment.price'):</strong> {{ !empty($consignment->price) ? core()->formatBasePrice((float) $consignment->price) : '-' }}<br/>

                <strong>@lang('member::app.consignment.net_takeback_amount'):</strong> {{ core()->formatBasePrice($consignment->net_takeback_amount) ?? '-' }}<br/>

                <strong>@lang('member::app.consignment.item_description'):</strong> {{ $consignment->item_description ?? '-' }}<br/>

                <strong>@lang('member::app.consignment.comes_with'):</strong>

                @php
                    $keys = ['b','db','ss','c','l','k','or','cr','sr','cc','ac','rc'];
                    
                    // Filter to get only the ones that are set to 1 in the database
                    $selectedAttributes = [];
                    foreach ($keys as $key) {
                        if (!empty($consignment->$key) && $consignment->$key == 1) {
                            $selectedAttributes[] = $attributes[$key] ?? $key;
                        }
                    }
                @endphp

                @if(count($selectedAttributes) > 0)
                    {{ implode(', ', $selectedAttributes) }}
                @else
                    -
                @endif
                <br/>
                <strong>@lang('member::app.consignment.nric'):</strong> {{ $consignment->nric ?? '-' }}<br/>

                <strong>@lang('member::app.consignment.date'):</strong> {{ $consignment->consignment_date ?? '-' }}<br/>

            </div>
        </div>        
    </div>

@endcomponent