<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'name',
    'label' => null,
    'inRowLabel' => null,
    'value' => old($name),
    'options' => [],   // ['0' => 'Tidak', '1' => 'Ya']
    'required' => false,
    'disabled' => false,
    'class' => '',
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'name',
    'label' => null,
    'inRowLabel' => null,
    'value' => old($name),
    'options' => [],   // ['0' => 'Tidak', '1' => 'Ya']
    'required' => false,
    'disabled' => false,
    'class' => '',
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<style>
    .select-theme {
        background: #f6e4bd !important;
        color: #661b18 !important;
        border: 1px solid #d4af37 !important;
        border-radius: 6px;
        padding: 8px 12px;
        font-size: 15px;
    }

    .select-theme:focus {
        border-color: #c19d2f !important;
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25) !important;
        outline: none !important;
    }

    .label-theme {
        color: #661b18;
        font-weight: 600;
        margin-bottom: 4px;
        display: inline-block;
    }

    .input-error {
        color: #b70000;
        font-size: 14px;
        margin-top: 4px;
    }
</style>



<?php if($inRowLabel): ?>
    <div class="row mb-3 align-items-center w-100">
        <label for="<?php echo e($name); ?>" class="col-lg-2 col-form-label label-theme">
            <?php echo e($inRowLabel); ?>

        </label>

        <div class="col-lg-10">
            <select
                name="<?php echo e($name); ?>"
                id="<?php echo e($name); ?>"
                <?php if($required): ?> required <?php endif; ?>
                <?php if($disabled): ?> disabled <?php endif; ?>
                class="form-select select-theme <?php echo e($class); ?>"
                <?php echo e($attributes); ?>

            >
                <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $optionValue => $optionLabel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($optionValue); ?>" <?php echo e((string)$value === (string)$optionValue ? 'selected' : ''); ?>>
                        <?php echo e($optionLabel); ?>

                    </option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>

            <?php $__errorArgs = [$name];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="input-error"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>
    </div>


<?php else: ?>
    <div class="mb-3 w-100">
        <?php if($label): ?>
            <label for="<?php echo e($name); ?>" class="label-theme">
                <?php echo e($label); ?>

            </label>
        <?php endif; ?>

        <select
            name="<?php echo e($name); ?>"
            id="<?php echo e($name); ?>"
            <?php if($required): ?> required <?php endif; ?>
            <?php if($disabled): ?> disabled <?php endif; ?>
            class="form-select select-theme <?php echo e($class); ?>"
            <?php echo e($attributes); ?>

        >
            <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $optionValue => $optionLabel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($optionValue); ?>" <?php echo e((string)$value === (string)$optionValue ? 'selected' : ''); ?>>
                    <?php echo e($optionLabel); ?>

                </option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>

        <?php $__errorArgs = [$name];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
            <div class="input-error"><?php echo e($message); ?></div>
        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
    </div>
<?php endif; ?>
<?php /**PATH C:\PAW\PiaZhang\resources\views/components/input-select.blade.php ENDPATH**/ ?>