@foreach($configs as $key => $config)
    @if($config['type'] == 'select')
    <div class="col-12 mb-9">
        <label class="fs-6 fw-semibold mb-2">{{ $config['name'] }}</label>
        <span class="fs-5 text-gray-500 fw-semibold d-block mb-2">* {{ $config['description'] }}</span>
        <select class="form-control form-control-select" name="{{ $key }}">
            @foreach($config['values'] as $altkey => $value)
            <option value="{{ $altkey }}"{{ $updata[$key] == $altkey ? ' selected':'' }}>{{ $value }}</option>
            @endforeach
        </select>
    </div>
    @elseif($config['type'] == 'multpileselect')
    <div class="col-12 mb-9">
        <label class="fs-6 fw-semibold mb-2">{{ $config['name'] }}</label>
        <span class="fs-5 text-gray-500 fw-semibold d-block mb-2">* {{ $config['description'] }}</span>
        <select class="form-control form-control-select" name="{{ $key }}[]" multiple>
            @foreach($config['values'] as $altkey => $value)
                @php $selected = false; @endphp
                @foreach($updata[$key] as $itemkey)
                    @if($itemkey == $altkey)
                        @php $selected = true; @endphp
                    @endif
                @endforeach
            <option value="{{ $altkey }}"{{ $selected ? ' selected':'' }}>{{ $value }}</option>
            @endforeach
        </select>
    </div>
    @elseif($config['type'] == 'string')
    <div class="col-12 mb-9">
        <label class="fs-6 fw-semibold mb-2">{{ $config['name'] }}</label>
        <span class="fs-5 text-gray-500 fw-semibold d-block mb-2">* {{ $config['description'] }}</span>
        <input type="text" class="form-control" name="{{ $key }}" value="{{ $updata[$key] }}">
    </div>
    @elseif($config['type'] == 'integer')
    <div class="col-12 mb-9">
        <label class="fs-6 fw-semibold mb-2">{{ $config['name'] }}</label>
        <span class="fs-5 text-gray-500 fw-semibold d-block mb-2">* {{ $config['description'] }}</span>
        <input type="number" class="form-control" name="{{ $key }}" value="{{ $updata[$key] }}">
    </div>
    @elseif($config['type'] == 'float')
    <div class="col-12 mb-9">
        <label class="fs-6 fw-semibold mb-2">{{ $config['name'] }}</label>
        <span class="fs-5 text-gray-500 fw-semibold d-block mb-2">* {{ $config['description'] }}</span>
        <input type="string" class="form-control" name="{{ $key }}" value="{{ $updata[$key] }}">
    </div>
    @elseif($config['type'] == 'date')
    <div class="col-12 mb-9">
        <label class="fs-6 fw-semibold mb-2">{{ $config['name'] }}</label>
        <span class="fs-5 text-gray-500 fw-semibold d-block mb-2">* {{ $config['description'] }}</span>
        <input type="datetime-local" class="form-control" name="{{ $key }}" value="{{ date('Y-m-d\TH:i',$updata[$key]) }}">
    </div>
    @endif
@endforeach