import { defineComponent } from "vue";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";

const ActionPreview = defineComponent({
  name: "ActionCreate",
  props: {
    isInv: {
      type: Boolean
    }
  },
  emits: ["preview"],
  setup(props, { emit }) {
    return () => (
      <el-button
        class="reset-margin"
        link
        size="small"
        type="primary"
        onClick={() => emit("preview")}
        icon={useRenderIcon(props.isInv ? "scaletooriginal" : "eye-view")}
      />
    );
  }
});

export default ActionPreview;
