/**
 * Time 字段渲染策略
 */

import React from 'react';
import { TimePicker } from 'antd';
import { BaseFieldStrategy } from './BaseFieldStrategy';
import type { FieldRenderContext } from '../IFieldRenderStrategy';

export class TimeStrategy extends BaseFieldStrategy {
  supportsReadonly = false;

  render(context: FieldRenderContext): React.ReactNode {
    const { field, value, onChange } = context;
    const disabledProps = this.getDisabledProps(context);
    
    return (
      <TimePicker
        style={{ width: '100%' }}
        placeholder={field.placeholder}
        {...disabledProps}
        value={value}
        onChange={onChange}
      />
    );
  }
}

