// packages/block-library/src/list/deprecated.js
import { RichText, InnerBlocks, useBlockProps } from "@wordpress/block-editor";
import migrateFontFamily from "../utils/migrate-font-family";
import { migrateToListV2, migrateTypeToInlineStyle } from "./utils";
import { jsx } from "react/jsx-runtime";
var v0 = {
  attributes: {
    ordered: {
      type: "boolean",
      default: false,
      role: "content"
    },
    values: {
      type: "string",
      source: "html",
      selector: "ol,ul",
      multiline: "li",
      __unstableMultilineWrapperTags: ["ol", "ul"],
      default: "",
      role: "content"
    },
    type: {
      type: "string"
    },
    start: {
      type: "number"
    },
    reversed: {
      type: "boolean"
    },
    placeholder: {
      type: "string"
    }
  },
  supports: {
    anchor: true,
    className: false,
    typography: {
      fontSize: true,
      __experimentalFontFamily: true
    },
    color: {
      gradients: true,
      link: true
    },
    __unstablePasteTextInline: true,
    __experimentalSelector: "ol,ul",
    __experimentalSlashInserter: true
  },
  save({ attributes }) {
    const { ordered, values, type, reversed, start } = attributes;
    const TagName = ordered ? "ol" : "ul";
    return /* @__PURE__ */ jsx(TagName, { ...useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ jsx(RichText.Content, { value: values, multiline: "li" }) });
  },
  migrate: migrateFontFamily,
  isEligible({ style }) {
    return style?.typography?.fontFamily;
  }
};
var v1 = {
  attributes: {
    ordered: {
      type: "boolean",
      default: false,
      role: "content"
    },
    values: {
      type: "string",
      source: "html",
      selector: "ol,ul",
      multiline: "li",
      __unstableMultilineWrapperTags: ["ol", "ul"],
      default: "",
      role: "content"
    },
    type: {
      type: "string"
    },
    start: {
      type: "number"
    },
    reversed: {
      type: "boolean"
    },
    placeholder: {
      type: "string"
    }
  },
  supports: {
    anchor: true,
    className: false,
    typography: {
      fontSize: true,
      __experimentalFontFamily: true,
      lineHeight: true,
      __experimentalFontStyle: true,
      __experimentalFontWeight: true,
      __experimentalLetterSpacing: true,
      __experimentalTextTransform: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    },
    color: {
      gradients: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true
      }
    },
    __unstablePasteTextInline: true,
    __experimentalSelector: "ol,ul",
    __experimentalSlashInserter: true
  },
  save({ attributes }) {
    const { ordered, values, type, reversed, start } = attributes;
    const TagName = ordered ? "ol" : "ul";
    return /* @__PURE__ */ jsx(TagName, { ...useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ jsx(RichText.Content, { value: values, multiline: "li" }) });
  },
  migrate: migrateToListV2
};
var v2 = {
  attributes: {
    ordered: {
      type: "boolean",
      default: false,
      role: "content"
    },
    values: {
      type: "string",
      source: "html",
      selector: "ol,ul",
      multiline: "li",
      __unstableMultilineWrapperTags: ["ol", "ul"],
      default: "",
      role: "content"
    },
    type: {
      type: "string"
    },
    start: {
      type: "number"
    },
    reversed: {
      type: "boolean"
    },
    placeholder: {
      type: "string"
    }
  },
  supports: {
    anchor: true,
    className: false,
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    },
    color: {
      gradients: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true
      }
    },
    spacing: {
      margin: true,
      padding: true,
      __experimentalDefaultControls: {
        margin: false,
        padding: false
      }
    },
    __unstablePasteTextInline: true,
    __experimentalSelector: "ol,ul",
    __experimentalSlashInserter: true
  },
  isEligible({ type }) {
    return !!type;
  },
  save({ attributes }) {
    const { ordered, type, reversed, start } = attributes;
    const TagName = ordered ? "ol" : "ul";
    return /* @__PURE__ */ jsx(TagName, { ...useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ jsx(InnerBlocks.Content, {}) });
  },
  migrate: migrateTypeToInlineStyle
};
var v3 = {
  attributes: {
    ordered: {
      type: "boolean",
      default: false,
      role: "content"
    },
    values: {
      type: "string",
      source: "html",
      selector: "ol,ul",
      multiline: "li",
      __unstableMultilineWrapperTags: ["ol", "ul"],
      default: "",
      role: "content"
    },
    type: {
      type: "string"
    },
    start: {
      type: "number"
    },
    reversed: {
      type: "boolean"
    },
    placeholder: {
      type: "string"
    }
  },
  supports: {
    anchor: true,
    className: false,
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    },
    color: {
      gradients: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true
      }
    },
    spacing: {
      margin: true,
      padding: true,
      __experimentalDefaultControls: {
        margin: false,
        padding: false
      }
    },
    __unstablePasteTextInline: true,
    __experimentalSelector: "ol,ul",
    __experimentalOnMerge: "true",
    __experimentalSlashInserter: true
  },
  save({ attributes }) {
    const { ordered, type, reversed, start } = attributes;
    const TagName = ordered ? "ol" : "ul";
    return /* @__PURE__ */ jsx(
      TagName,
      {
        ...useBlockProps.save({
          reversed,
          start,
          style: {
            listStyleType: ordered && type !== "decimal" ? type : void 0
          }
        }),
        children: /* @__PURE__ */ jsx(InnerBlocks.Content, {})
      }
    );
  }
};
var deprecated_default = [v3, v2, v1, v0];
export {
  deprecated_default as default
};
//# sourceMappingURL=deprecated.js.map
