<?php

namespace MovieEngine\Payments;

if (! defined("ABSPATH")) {
    exit; // Exit if accessed directly
}

class PPV {

    public static function has_purchased($user_id, $post_id) {
        return apply_filters('movie_engine_has_purchased', false, $user_id, $post_id);
    }

    public static function get_user_purchases($user_id, $type = 'sale') {
        return apply_filters('movie_engine_get_user_purchases', [], $user_id, $type);
    }

    public static function get_user_active_rentals($user_id) {
        return apply_filters('movie_engine_get_user_active_rentals', [], $user_id);
    }

    public static function has_active_rental($user_id, $post_id) {
        return apply_filters('movie_engine_has_active_rental', false, $user_id, $post_id);
    }

    public static function get_rental_expiry($user_id, $post_id) {
        return apply_filters('movie_engine_get_rental_expiry', 0, $user_id, $post_id);
    }

    public static function has_access($user_id, $post_id) {
        return apply_filters('movie_engine_has_ppv_access', false, $user_id, $post_id);
    }

    public static function get_rental_time_remaining($user_id, $post_id) {
        return apply_filters('movie_engine_get_rental_time_remaining', 0, $user_id, $post_id);
    }
}
