// PrinterSelect.js
import React from 'react'
import PropTypes from 'prop-types'
import config from '../../../config'
import ObjectSelect from './ObjectSelect'

const PrinterSelect = ({ onChange, disabled }) => {
  return (
    <ObjectSelect
      endpoint={`${config.backendUrl}/printers`}
      propertyOrder={['tags']}
      onChange={onChange}
      disabled={disabled}
      placeholder='Select Printer'
      type='printer'
    />
  )
}

PrinterSelect.propTypes = {
  onChange: PropTypes.func,
  disabled: PropTypes.bool,
  checkable: PropTypes.bool,
  value: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
}

export default PrinterSelect
