import { PisellExport } from "./PisellExport";
import { DownloadOutlined } from '@ant-design/icons';
var meta = {
  title: 'Data Entry/PisellExport',
  component: PisellExport,
  tags: ['autodocs'],
  argTypes: {
    variant: {
      description: '展示形态',
      control: 'radio',
      options: ['icon', 'button']
    },
    size: {
      description: '尺寸',
      control: 'radio',
      options: ['small', 'medium', 'large']
    },
    type: {
      description: '视觉类型',
      control: 'radio',
      options: ['default', 'primary']
    },
    disabled: {
      description: '是否禁用',
      control: 'boolean'
    },
    label: {
      description: 'Button 形态文案',
      control: 'text'
    }
  }
};
export default meta;
/**
 * 默认 Button 形态
 */
export var Basic = {
  args: {
    variant: 'button',
    size: 'medium',
    type: 'default',
    onExport: function onExport() {
      return console.log('onExport');
    }
  }
};

/**
 * 仅图标形态
 */
export var IconOnly = {
  args: {
    variant: 'icon',
    size: 'medium',
    type: 'default',
    onExport: function onExport() {
      return console.log('onExport');
    }
  }
};

/**
 * 三种尺寸 - Button
 */
export var SizesButton = {
  render: function render() {
    return /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        alignItems: 'center',
        gap: 16,
        flexWrap: 'wrap'
      }
    }, /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "small",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "medium",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "large",
      onExport: function onExport() {}
    }));
  }
};

/**
 * 三种尺寸 - Icon
 */
export var SizesIcon = {
  render: function render() {
    return /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        alignItems: 'center',
        gap: 16
      }
    }, /*#__PURE__*/React.createElement(PisellExport, {
      variant: "icon",
      size: "small",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "icon",
      size: "medium",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "icon",
      size: "large",
      onExport: function onExport() {}
    }));
  }
};

/**
 * 默认样式 vs 主色样式
 */
export var DefaultVsPrimary = {
  render: function render() {
    return /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        alignItems: 'center',
        gap: 16
      }
    }, /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      type: "default",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      type: "primary",
      onExport: function onExport() {}
    }));
  }
};

/**
 * 禁用态
 */
export var Disabled = {
  render: function render() {
    return /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        alignItems: 'center',
        gap: 16
      }
    }, /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      disabled: true,
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      type: "primary",
      disabled: true,
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "icon",
      disabled: true,
      onExport: function onExport() {}
    }));
  }
};

/**
 * 自定义文案
 */
export var CustomLabel = {
  args: {
    variant: 'button',
    label: '导出 Excel',
    onExport: function onExport() {}
  }
};

/**
 * 自定义图标（antd 图标）
 */
export var CustomIcon = {
  args: {
    variant: 'button',
    icon: /*#__PURE__*/React.createElement(DownloadOutlined, {
      style: {
        fontSize: 24
      }
    }),
    label: '下载',
    onExport: function onExport() {}
  }
};

/**
 * 点击回调示例
 */
export var WithCallback = {
  args: {
    variant: 'button',
    label: '点击导出',
    onExport: function onExport(e) {
      alert('onExport 已触发，由调用方实现导出逻辑');
    }
  }
};

/**
 * 设计稿矩阵：Button 形态 × 尺寸 × 类型
 */
export var ButtonMatrix = {
  render: function render() {
    return /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        flexDirection: 'column',
        gap: 24
      }
    }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
      style: {
        marginBottom: 8,
        fontSize: 12,
        color: '#666'
      }
    }, "Default / Small, Medium, Large"), /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        gap: 16,
        alignItems: 'center'
      }
    }, /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "small",
      type: "default",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "medium",
      type: "default",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "large",
      type: "default",
      onExport: function onExport() {}
    }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
      style: {
        marginBottom: 8,
        fontSize: 12,
        color: '#666'
      }
    }, "Primary / Small, Medium, Large"), /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        gap: 16,
        alignItems: 'center'
      }
    }, /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "small",
      type: "primary",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "medium",
      type: "primary",
      onExport: function onExport() {}
    }), /*#__PURE__*/React.createElement(PisellExport, {
      variant: "button",
      size: "large",
      type: "primary",
      onExport: function onExport() {}
    }))));
  }
};