package com.bytedance.ies.sdk.widgets;

import X.05P;
import X.2Pr;
import X.LsC;
import X.M12;
import com.bytedance.covode.number.Covode;
import java.util.List;

public interface ElementSpec {
    static {
        Covode.recordClassIndex(30475);
    }

    void attach(ConstraintProperty constraintProperty);

    void dispose();

    AnimationInfo getAnimation();

    05P getConstraintWidget();

    int getId();

    LsC<ConstraintProperty, 2Pr> getOnAttach();

    List<SceneObserver> getSceneObservers();

    void onDispose();

    public static final class DefaultImpls {
        static {
            Covode.recordClassIndex(30476);
        }

        public static void onDispose(ElementSpec elementSpec) {
            M12.LIZ(elementSpec);
        }

        public static void dispose(ElementSpec elementSpec) {
            M12.LIZ(elementSpec);
            elementSpec.onDispose();
            AnimationInfo animation = elementSpec.getAnimation();
            if (animation != null) {
                animation.cancelShowAnimation();
            }
            AnimationInfo animation2 = elementSpec.getAnimation();
            if (animation2 != null) {
                animation2.cancelHideAnimation();
            }
        }

        public static void attach(ElementSpec elementSpec, ConstraintProperty constraintProperty) {
            M12.LIZ(elementSpec, constraintProperty);
            LsC<ConstraintProperty, 2Pr> onAttach = elementSpec.getOnAttach();
            if (onAttach != null) {
                onAttach.invoke(constraintProperty);
            }
        }
    }
}
