import { SelectBoxFilled } from 'tvu-react-pilot'

const Surface = ({ children }: any) => (
  <div style={{ background: 'var(--bg-layer1)', padding: 20, display: 'flex', gap: 12, flexWrap: 'wrap', alignItems: 'center', borderRadius: 8 }}>
    {children}
  </div>
)

const protocols = [
  { label: 'SRT', value: 'srt' },
  { label: 'RTMP', value: 'rtmp' },
  { label: 'HLS', value: 'hls' },
  { label: 'WebRTC', value: 'webrtc' },
]

export const Placeholder = () => (
  <Surface>
    <SelectBoxFilled darkTheme="on" size="M" status="Placeholder" enable="on" ux="default" feature="default" placeholder="Select protocol" options={protocols} value="" />
  </Surface>
)

export const Selected = () => (
  <Surface>
    <SelectBoxFilled darkTheme="on" size="M" status="Value" enable="on" ux="default" feature="default" options={protocols} value="srt" />
  </Surface>
)

export const Sizes = () => (
  <Surface>
    <SelectBoxFilled darkTheme="on" size="M" status="Value" enable="on" ux="default" feature="default" options={protocols} value="rtmp" />
    <SelectBoxFilled darkTheme="on" size="L" status="Value" enable="on" ux="default" feature="default" options={protocols} value="rtmp" />
  </Surface>
)

export const Error = () => (
  <Surface>
    <SelectBoxFilled darkTheme="on" size="M" status="Placeholder" enable="on" ux="error" feature="default" placeholder="Protocol required" options={protocols} value="" />
  </Surface>
)

export const Disabled = () => (
  <Surface>
    <SelectBoxFilled darkTheme="on" size="M" status="Value" enable="off" ux="default" feature="default" options={protocols} value="hls" />
  </Surface>
)
