import React from 'react';
import { PisellTimeNavigator } from "./PisellTimeNavigator";

/**
 * PisellTimeNavigator 组件 Storybook
 * 时间导航轴：时间范围内浏览、选择、控制
 */
var meta = {
  title: 'Data Entry/PisellTimeNavigator',
  component: PisellTimeNavigator,
  tags: ['autodocs'],
  argTypes: {
    cursorMode: {
      control: 'radio',
      options: ['axis-moves', 'cursor-moves'],
      description: '指示器/轴移动模式'
    },
    orientation: {
      control: 'radio',
      options: ['horizontal', 'vertical'],
      description: '横向/竖向'
    },
    realtime: {
      control: 'boolean',
      description: '是否实时跟随系统时间'
    },
    showNowButton: {
      control: 'boolean',
      description: '是否显示 Now 按钮'
    },
    snapToStep: {
      control: 'boolean',
      description: '是否吸附到刻度'
    },
    inertia: {
      control: 'boolean',
      description: '是否开启惯性滚动'
    },
    locale: {
      control: 'select',
      options: ['zh-cn', 'en', 'zh-hk'],
      description: '语言'
    }
  }
};
export default meta;
var verticalDecorator = function verticalDecorator(Story) {
  return /*#__PURE__*/React.createElement("div", {
    style: {
      width: 54,
      height: 500
    }
  }, /*#__PURE__*/React.createElement(Story, null));
};

/**
 * 默认：横向、轴动、显示 Now
 */
export var Default = {
  args: {}
};

/** 默认 - 竖向 */
export var DefaultVertical = {
  args: {
    orientation: 'vertical'
  },
  decorators: [verticalDecorator]
};

/**
 * 受控 + 默认 12:00
 */
export var Controlled = {
  args: {
    value: '12:00',
    onChange: function onChange(v) {
      return console.log('onChange', v === null || v === void 0 ? void 0 : v.format('HH:mm'));
    }
  }
};

/** 受控 - 竖向 */
export var ControlledVertical = {
  args: {
    orientation: 'vertical',
    value: '12:00',
    onChange: function onChange(v) {
      return console.log('onChange', v === null || v === void 0 ? void 0 : v.format('HH:mm'));
    }
  },
  decorators: [verticalDecorator]
};

/**
 * 非受控 + 默认 14:30
 */
export var Uncontrolled = {
  args: {
    defaultValue: '14:30'
  }
};

/** 非受控 - 竖向 */
export var UncontrolledVertical = {
  args: {
    orientation: 'vertical',
    defaultValue: '14:30'
  },
  decorators: [verticalDecorator]
};

/**
 * 竖向
 */
export var Vertical = {
  args: {
    orientation: 'vertical',
    defaultValue: '12:00'
  },
  decorators: [verticalDecorator]
};

/**
 * 指针动模式（cursor-moves）
 */
export var CursorMoves = {
  args: {
    cursorMode: 'cursor-moves',
    defaultValue: '10:00'
  }
};

/** 指针动模式 - 竖向 */
export var CursorMovesVertical = {
  args: {
    orientation: 'vertical',
    cursorMode: 'cursor-moves',
    defaultValue: '10:00'
  },
  decorators: [verticalDecorator]
};

/**
 * 营业时间高亮 10:00–22:00
 */
export var BusinessHours = {
  args: {
    businessHours: {
      start: '10:00',
      end: '22:00'
    },
    defaultValue: '14:00'
  }
};

/** 营业时间高亮 - 竖向 */
export var BusinessHoursVertical = {
  args: {
    orientation: 'vertical',
    businessHours: {
      start: '10:00',
      end: '22:00'
    },
    defaultValue: '14:00'
  },
  decorators: [verticalDecorator]
};

/**
 * 自定义时间范围 08:00–20:00
 */
export var CustomRange = {
  args: {
    range: {
      start: '08:00',
      end: '20:00'
    },
    defaultValue: '12:00'
  }
};

/** 自定义时间范围 - 竖向 */
export var CustomRangeVertical = {
  args: {
    orientation: 'vertical',
    range: {
      start: '08:00',
      end: '20:00'
    },
    defaultValue: '12:00'
  },
  decorators: [verticalDecorator]
};

/**
 * 步长 30 分钟
 */
export var Step30 = {
  args: {
    stepMinutes: 30,
    defaultValue: '12:30'
  }
};

/** 步长 30 分钟 - 竖向 */
export var Step30Vertical = {
  args: {
    orientation: 'vertical',
    stepMinutes: 30,
    defaultValue: '12:30'
  },
  decorators: [verticalDecorator]
};

/**
 * 惯性滚动开启
 */
export var Inertia = {
  args: {
    inertia: true,
    defaultValue: '12:00'
  }
};

/** 惯性滚动 - 竖向 */
export var InertiaVertical = {
  args: {
    orientation: 'vertical',
    inertia: true,
    defaultValue: '12:00'
  },
  decorators: [verticalDecorator]
};

/**
 * 吸附到整点（松手后自动吸附到 0/15/30/45 分刻度）
 */
export var SnapToStep = {
  args: {
    snapToStep: true,
    defaultValue: '12:00'
  }
};

/** 吸附到整点 - 竖向 */
export var SnapToStepVertical = {
  args: {
    orientation: 'vertical',
    snapToStep: true,
    defaultValue: '12:00'
  },
  decorators: [verticalDecorator]
};

/**
 * 隐藏 Now 按钮
 */
export var NoNowButton = {
  args: {
    showNowButton: false
  }
};

/** 隐藏 Now 按钮 - 竖向 */
export var NoNowButtonVertical = {
  args: {
    orientation: 'vertical',
    showNowButton: false
  },
  decorators: [verticalDecorator]
};

/**
 * 实时模式（仅演示，实际会跟随系统时间）
 */
export var Realtime = {
  args: {
    realtime: true
  }
};

/** 实时模式 - 竖向 */
export var RealtimeVertical = {
  args: {
    orientation: 'vertical',
    realtime: true
  },
  decorators: [verticalDecorator]
};