<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
/**
 * CMB select field type
 *
 * @since  2.2.2
 *
 * @category  WordPress_Plugin
 * @package   Storyposts_CMB2
 * @author    Storyposts_CMB2 team
 * @license   GPL-2.0+
 * @link      https://cmb2.io
 *
 * Modified by storyposts on 03-May-2026 using {@see https://github.com/BrianHenryIE/strauss}.
 */
class Storyposts_CMB2_Type_Select extends Storyposts_CMB2_Type_Multi_Base {

	public function render() {
		$a = $this->parse_args( 'select', array(
			'class'   => 'storyposts_cmb2_select',
			'name'    => $this->_name(),
			'id'      => $this->_id(),
			'desc'    => $this->_desc( true ),
			'options' => $this->concat_items(),
		) );

		$attrs = $this->concat_attrs( $a, array( 'desc', 'options' ) );

		return $this->rendered(
			sprintf( '<select%s>%s</select>%s', $attrs, $a['options'], $a['desc'] )
		);
	}
}
