import { computed as o } from "vue";
import "../../../config-provider/index.mjs";
import { useToken as c } from "../../../config-provider/hooks/use-token.mjs";
import m from "../style/index.mjs";
import { getHexWithOpacity as d } from "../utils/getFileInfo.mjs";
import { useNamespace as w } from "../../../config-provider/hooks/use-namespace.mjs";
function g(a, l) {
  const { b: r, bm: e } = w("ap-download"), n = m("ap-download"), { token: p } = c(), s = o(() => ({
    "--download-main-color": p.value?.colorLink,
    "--download-main-color-opacity": d(
      p.value?.colorLink,
      0.6
    )
  })), i = o(() => [r("wrapper"), e("wrapper", a.value), n.value].filter(
    Boolean
  )), u = o(() => {
    const t = [r(), r("inner-wrapper"), e("inner-wrapper", a.value)];
    return l.value && t.push(e("inner-wrapper", "disabled")), [...t, n.value];
  });
  return {
    wrapperStyle: s,
    getWrapperClass: i,
    getInnerWrapperClass: u
  };
}
export {
  g as useStyle
};
