<?php

namespace Modules\Product\Http\Resources;

class ProductSectionResource extends BaseResource
{
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'title' => $this->title(),
            'multi-select' => $this->select_type === 'multi' ? true : false,
            'required' => $this->required === '1' ? true : false,
            'items' => SectionItemResource::collection($this->Items),
        ];
    }
}
